Re: Button click not firing
Hi! Have you got this declared in your code behind(at the top of your webform class?)
Code:
Protected WithEvents cmdAddJob As System.Web.UI.WebControls.Button
tsami
Re: Button click not firing
Re: Button click not firing
...and you've closed the button tag? :)
Code:
<asp:button id="cmdAddJob" runat="server" Font-Names="Arial"></asp:button>
Are you working with vs2003 btw? If you are, go to the designer mode and double click your button to ensure that the event wiring is ok.
tsami
Re: Button click not firing
Sorry, yes, I did close the tag, and the designer behaves as expected.
Re: Button click not firing
dear friend
i dont know bout vb much.how does i work
but while working in C# as codebehind i faced siimilar problem .for that we have to write systemhandler for the control if it is missing in initializecomponent.
hope this helps
you can find similar thing for VB
-Sachien
Re: Button click not firing
Well, more info but more puzzling:
I can re-create the page by adding new controls and get something that works as expected.
I noticed that if I move the button to another location it can 'break' the click event- removes the Handles cmdAddJob.click from the event code ?!?
I can get it working now but I am stumped as to what causes the behavior.
Re: Button click not firing
The designer will mess you up. Use html view at all times if you can. also a sure fire way to have your event fire is to set onclick="name_of_click_handler" in the button tag.