title: Does not contain definition error for Button click event in asp.net page
body: <p>i have a button in edit.aspx page with below code</p>
  
  <pre><code>&lt;asp:Button ID="GoButton" runat="server" Text="Go" onclick="GoButton_Click" /&gt;
  </code></pre>
  
  <p>then the page directive is as follows</p>
  
  <pre><code>&lt;%@ Page language="c#"  EnableEventValidation="false" Codebehind="AdminHotelEdit.aspx.cs" AutoEventWireup="false" Inherits="GTIAdmin.AdminHotelEdit" ValidateRequest="false"%&gt;
  </code></pre>
  
  <p>and i have the button click event defined in code behind file as follows</p>
  
  <pre><code>public void GoButton_Click(object sender, EventArgs e)
  {
  }
  </code></pre>
  
  <p>when i debug program is getting error stating that</p>
  
  <pre><code>Error   146 'ASP.edit_aspx' does not contain a definition for 'GoButton_Click'
  and no extension method 'GoButton_Click' accepting a first argument of type
  'ASP.adminhoteledit_aspx' could be found (are you missing a using directive or an
  assembly reference?)    
  </code></pre>
  
  <p>please suggest me if you have idea about the reason of this error.</p>
  
  <p>the code in edit.cs is as follows</p>
  
  <pre><code>namespace GTIAdmin
  {
      /// &lt;summary&gt;
      /// Summary description for AdminHotelEdit.
      /// &lt;/summary&gt;
  
      public class AdminHotelEdit : GTIAdminPage
      {
          protected Button GoButton_Click;
  
          private void Page_Load(object sender, System.EventArgs e)
          {
  
          }
  
          public void GoButton_Click(object sender, EventArgs e)
          {
  
          }
      }
  }
  </code></pre>