C# ASP.NET Buttons not firing on page
Posted on 2004-04-29
I've an Admin web page which displays a Tabstrip control. On each tab strip page there is a Button
protected System.Web.UI.WebControls.Button btnChangePwd;
protected System.Web.UI.WebControls.Button btnUpdateParameters;
protected System.Web.UI.WebControls.Button btnChangePrivileges;
Each of these appears in the InitializeComponent section
this.btnChangePwd.Click += new System.EventHandler(this.btnChangePwd_Click);
this.btnUpdateParameters.Click += new System.EventHandler(this.btnUpdateParameters_Click);
this.btnChangePrivileges.Click += new System.EventHandler(this.btnChangePrivileges_Click);
and each of these do have a function behind each button which saves details to the database.
private void btnUpdateParameters_Click(object sender, System.EventArgs e)
When I had just btnChangePwd this button fired successfully. Now that I've enhanced this page, no buttons work when viewing in a web page. I can double click the button in design view, and the associated code is displayed for editing. Its like the association between the button and code doesnt exist. I've viewed the source when the page is displayed in a browser and can see no difference between that and buttons on other web pages.
I've also added a combo box, and the SelectedIndexChanged function works fine, updating associated radio buttons for me with uses permissions, so the code behind is working.
I don't understand why these buttons are failing to fire. I've compared this page to others that have buttons and I see no difference. Its the only page out of 15 where the buttons are failing to fire.
Any advice appreciated.