Button control _Click event not firing

  • Thread starter Thread starter Max
  • Start date Start date
M

Max

For some reason my button control just stopped working. In debug mode I
found the _Click event is just not firing. When I click submit, the page
just refreshes. Any idea what's going on?

-Max
 
check the InitializeComponent() section..
I have a problem where my events keep vanishing and that's the result....
 
check to make sure you didn't accidentally remove the line:

this.Button1.Click += new System.EventHandler(this.Button1_Click);

from your InitializeComponent() function. also - check to make sure you
didn't change the name of the button while the editor wasn't looking.

John

For some reason my button control just stopped working. In debug mode I
found the _Click event is just not firing. When I click submit, the page
just refreshes. Any idea what's going on?

-Max
 
I think that was it... I read something about code disappearing being a
common bug in VS.NET. Someone said turn off code reformatting to fix this.

I'm not sure if it was the InitializeComponent sub though... what I think
what disappeared was the "Handles bSubmit.Click" specifying the button's
event sub.

InitializeComponent is currently empty:
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
End Sub

-Max
 
Back
Top