title: Button not firing event on ASP.NET control Programmatically
body: <p>I'm creating a Button on a <code>ComboxChanged</code> Event, </p>
  
  <pre><code>    Button btn = new Button();
      btn.ID = "btnNum1";
      btn.Text = "Edit";
      btn.Click += btnTest_Click;        
      pnl.Controls.Add(btn);
  </code></pre>
  
  <p>The event code is as followed</p>
  
  <pre><code> public void btnTest_Click(object sender, EventArgs e)
  {
      Button btn = (Button)sender;
      Response.Write(btn.ID);        
      Response.Redirect("Page2.aspx");
  }
  </code></pre>
  
  <p>I have tried, both <code>Response.Write</code> and <code>Response.Redirect</code>. None of them, works.
  Same page gets refreshed. Does any one has any idea.</p>
  
  <p>Button has to be created Dynamically, hence I can't try the <code>Page_Init</code></p>
  
  <p>I have also tried the CommandArgument event that also didn't work.
  Any idea. </p>