title: OnClick event is giving compilation error in asp.net
body: <p>I am having error in <code>LinkButton</code> tag when I am putting <code>OnClick</code> event in it. </p>
  
  <pre><code> &lt;asp:LinkButton ID="btngo" runat="server" CommandArgument='&lt;%# Eval("Blog_ID") %&gt;' Text="More" Font-Size="Smaller" OnClick="btngo_Click" ForeColor="#3366cc"&gt;&lt;/asp:LinkButton&gt;
  </code></pre>
  
  <p>and in code behind I have the code like this</p>
  
  <pre><code>protected void btngo_Click(object sender, EventArgs e)
      {
          int id = int.Parse((sender as LinkButton).CommandArgument);
          Response.Redirect("Blog-Post.aspx?BID=" + id);
      }
  </code></pre>
  
  <p>and it says</p>
  
  <p><code>CS1061: 'ASP.blog_aspx' does not contain a definition for 'btngo_Click' and no extension method 'btngo_Click' accepting a first argument of type 'ASP.blog_aspx' could be found (are you missing a using directive or an assembly reference?)</code></p>
  
  <p>Any solution?</p>