title: ASP.NET Button Click event does not appear to fire
body: <p>I'm relatively new to ASP.NET. I have a ASP.NET MVC 2 Web Application project (created in Visual Studio 2010). I added a method to HomeController called Search</p>
  
  <pre><code>public ActionResult Search()
  {
      return View();
  }
  </code></pre>
  
  <p>and created a corresponding view (web page) called Search.aspx onto which I dropped a button. I double-clicked the button to add a handler for the button click event which sets the text of a TextBox, then built the application.</p>
  
  <pre><code>&lt;script runat="server"&gt;
  
  
  protected void MyButton1_Click(object sender, EventArgs e)
  {
      System.Diagnostics.Debug.WriteLine("Undo button clicked");
      m_search_text_box.Text = "MyButton1_Click";
  }
  </code></pre>
  
  <p></p>
  
  <p>...</p>
  
  <p>
          
  </p>
  
  <p>When I click the button in my browser (I tested in Chrome and Internet Explorer), nothing happens. The text box is not updated. Nothing is written to the Output window either. So, it doesn't look like the event is firing. Can anybody offer any suggestions? I'm using Visual Studio 2010 on Windows 7.</p>
  
  <p>Thanks</p>