I am completely dumbfounded by this. I have created many webforms and been successful with the same approach. I have seen many posts on this exchange regarding similar issues, but i haven't seen anything completely pertinent.
When I click on the Button, nothing occurs.
Does anyone know what I have missed?
My HTML and ASP markup are as follows:
<asp:Button runat="server" ID="btn_AddSystem" onclick="BtnClick_SubmitNewSystem" Text="Add" />
The C# codebehind:
protected void Page_Load(object sender, EventArgs e)
{
btn_AddSystem.Click += new EventHandler(this.BtnClick_SubmitNewSystem);
}
protected void BtnClick_SubmitNewSystem(Object sender, EventArgs e)
{
try
{
System.Diagnostics.Debug.Write("working");
}catch (Exception ex)
{
System.Diagnostics.Debug.Write(ex.Message);
}
}