title: Asp.Net does not contain a definition for buttonClick?
body: <p>I am attempting to build a program on visual studio asp.net but whenever I try to click a button with an OnClick event I get the following error:</p>
  
  <p>"CS1061: 'ASP.test_aspx' does not contain a definition for 'buttonClick' and no extension method 'buttonClick' accepting a first argument of type 'ASP.test_aspx' could be found (are you missing a using directive or an assembly reference?)"</p>
  
  <p>Here is my HTML for reference:</p>
  
  <pre><code>&lt;%@ Page Language="C#" AutoEventWireup="true" CodeBehind="test.aspx.cs" Inherits="MRAApplication.test" %&gt;
  
  &lt;!DOCTYPE html&gt;
  
  &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
  &lt;head runat="server"&gt;
  &lt;title&gt;&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;form id="form1" runat="server"&gt;
  &lt;div&gt;
  &lt;asp:Button id="b1" Text="Submit" runat="server" OnClick="buttonClick" /&gt;
      &lt;asp:TextBox id="txt1" runat="server" /&gt;
  &lt;/div&gt;
  &lt;/form&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>and here is my code behind:</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Web;
  using System.Web.UI;
  using System.Web.UI.WebControls;
  
  namespace MRAApplication
  {
  public partial class test : System.Web.UI.Page
  {
  
      protected void Page_Load(object sender, EventArgs e)
      {
  
      }
  
      void buttonClick(Object sender, EventArgs e)
      {
          txt1.Text = "Text";
      }
  }
  }
  </code></pre>
  
  <p>Please keep explanations as simple as possible as I am new to coding.  Thank you for any and all help.  :)</p>