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?
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.
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...
Jeremy, thanks, this looks perfect and ifs quite easy to do! Wish I didn't have to do it, but I'll take it.
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.
That's why our company disables the "Design View" default when opening the page. (We've witnessed the code eating ourselves)
I just use notepad.
Yeah, as others have suggested, just keep it in the code view. That's what I always do.
Steve Jones (UK)
Fog Creek Home