Button control _Click event not firing

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
 
C

Curt_C [MVP]

check the InitializeComponent() section..
I have a problem where my events keep vanishing and that's the result....
 
J

John Ruiz

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
 
M

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top