![]() Welcome! and rules Joel on Software |
VS.NET easts my events I am basically at my wits end with this piece of junk. For the 5th time this week it has eaten my stack of even handlers. I cannot figure out how to work around this! Argh! Cna anything be done?
Sassy
We had the same problem on an ASP.NET app. What we did to get around this issue was to create a custom method in the in the code behind page and placed all of our eventhandlers in the custom method and then call this method from the Page.OnInit method.
Jeremy Howard
Sassy-
Greg Hurlman
I put them in onInit. I can't figure out exactly what causes this, it seems like it could be a result of changing from design / HTML mode, but I don't even use design mode...
Sassy
Jeremy, thanks, this looks perfect and ifs quite easy to do! Wish I didn't have to do it, but I'll take it.
Sassy
Anythinginside that "designer generated code" region will get rewritten once you pop in/out of design mode. Seems like Jeremy's answer is a good workaround though.
Greg Hurlman
That's why our company disables the "Design View" default when opening the page. (We've witnessed the code eating ourselves)
Fast Eddie
I just use notepad.
Devin
Yeah, as others have suggested, just keep it in the code view. That's what I always do.
Steve Jones (UK)
|