I did this, but the event does not seem to fire or at least the
Button1_Click is not being called.
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
this.Button1.Click += new System.EventHandler(Button1_Click);
this.Button2.Click += new System.EventHandler(Button1_Click);
}
protected void Button1_Click(object sender, EventArgs e)
{
System.Web.UI.WebControls.Button senderButton;
senderButton = (System.Web.UI.WebControls.Button) sender;
this.TextBox1.Text = senderButton.ID;
}
}
"Marc Gravell" <ma**********@gmail.comwrote in message
news:eK**************@TK2MSFTNGP02.phx.gbl...
Has the markup got an OnClick="Something" entry? Try removing this; then
add your handlers through code and all should be well.
Marc