Events get reset

  • Thread starter Thread starter Henke
  • Start date Start date
H

Henke

I have a web form with some buttons on.
Sometimes the event handler gets reset by Visual Studio.
Does anybody know why?
Thanks!

/Henke
 
I have a web form with some buttons on.
Sometimes the event handler gets reset by Visual Studio.
Does anybody know why?
Thanks!

VS is rather naff. If your coding your own event, stuff the code into the
Page_Load , this should keep it safe.
 
That was a nice work around... Do it your self :)
Is this Microsofts way of solving the problem too?

/Henke
 
I've only gotten this in one case: e.g. add button1 to your form, add the
code behind, then change the id of button1; the code remains, but the
"handles" clause goes away, so it's not going to handle your event till you
add the handler back in. Annoying, but not too tough to work around. Not sure
if it's a reported problem.

Bill
 
The thing is that I don't do any changes to either the id of the button or
anything about the button. It just get's reset.
/Henke
 
Back
Top