Why does C# & asp.net loose its event handlers?

Posts   
 
    
wayne avatar
wayne
User
Posts: 611
Joined: 07-Apr-2004
# Posted on: 10-Jan-2005 15:08:55   

Why does C# & asp.net loose its event handlers?

I work in VS.Net 2003 with C# and asp.net and every now and again the designer looses the connection to my eventhandlers - this causes buttons suddenly not to work and it is a real pain.

Does any one else experience this problem and is there a solution?

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39801
Joined: 17-Aug-2003
# Posted on: 10-Jan-2005 15:54:02   

Yes had the problem, no there is no solution. The problem is mainly vs.net and its incredible crappy asp.net editor.

Frans Bouma | Lead developer LLBLGen Pro
Devildog74
User
Posts: 719
Joined: 04-Feb-2004
# Posted on: 10-Jan-2005 19:19:12   

Since I stopped putting event handlers in the code dom section, I dont generally have the issue.

Also, there is an ide hotfix out there that has something todo with stopping the ide from loosing data.

swallace
User
Posts: 648
Joined: 18-Aug-2003
# Posted on: 10-Jan-2005 20:07:17   

Here's my favorite hotfix:

http://support.microsoft.com/?kbid=842706

We'd use these WinForms that had usercontrols embedded within usercontrols. Sometimes, for no apparent reason, you'd open the form and ... it's blank! All your work laying out the controls, poof!

This hotfix works and isn't deadly, and was only available via our MSDN Universal right-to-beg license. It should be available everywhere.

Happy to share from my own server:

http://www.developerfood.com/hotfixes/KB842706hotfix.zip

Got some other great hidden hotfixes? Let me know and I'll host them for use of the people here.

wayne avatar
wayne
User
Posts: 611
Joined: 07-Apr-2004
# Posted on: 10-Jan-2005 21:03:41   

This bug that i complained about is so irretating!!! rage You open a webform - change a property move something around and save - And without you knowing about it - it has lost all the events!!! So now you go and happenly release your work... and suddely you get a call that your application does not work anymore - It sucks.. Argggh

wayne avatar
wayne
User
Posts: 611
Joined: 07-Apr-2004
# Posted on: 10-Jan-2005 21:14:29   

Found some fixes for asp.net 1.1 - http://support.microsoft.com/ph/6351/en-us/?aid=2

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39801
Joined: 17-Aug-2003
# Posted on: 10-Jan-2005 21:43:30   

Scott: be aware that MS doesn't want you to share these hotfixes wink (I don't mind, nor will tell them, but just a FYI )...

It's shocking that fix is from May 2004... I thought regression testing didn't take that long...

Frans Bouma | Lead developer LLBLGen Pro
swallace
User
Posts: 648
Joined: 18-Aug-2003
# Posted on: 10-Jan-2005 22:18:24   

Scott: be aware that MS doesn't want you to share these hotfixes (I don't mind, nor will tell them, but just a FYI )...

Covering yourself. I understand. stuck_out_tongue_winking_eye

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39801
Joined: 17-Aug-2003
# Posted on: 10-Jan-2005 22:43:58   

stuck_out_tongue_winking_eye

Frans Bouma | Lead developer LLBLGen Pro
Cadmium avatar
Cadmium
User
Posts: 153
Joined: 19-Sep-2003
# Posted on: 11-Jan-2005 00:01:51   

Thats one of the reasons I completly abandoned the design editor long ago. That and I'm completly anal retentive about code formatting and vs.net puts your html through a blender.

Marcus avatar
Marcus
User
Posts: 747
Joined: 23-Apr-2004
# Posted on: 11-Jan-2005 10:13:14   

Cadmium wrote:

Thats one of the reasons I completly abandoned the design editor long ago. That and I'm completly anal retentive about code formatting and vs.net puts your html through a blender.

Have you tried Re-Sharper from JetBrains? This allows you to reformat code which a single click for the entire solution. You can specify all possible formatting rules. I can't live without it now...

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39801
Joined: 17-Aug-2003
# Posted on: 11-Jan-2005 10:59:52   

How does resharper perform on your 100+ project solution? I threw it out once it started to get really slow on a solution with 50,000+ lines of code. (no not in one file wink )

Frans Bouma | Lead developer LLBLGen Pro
swallace
User
Posts: 648
Joined: 18-Aug-2003
# Posted on: 11-Jan-2005 14:11:01   

I threw it out once it started to get really slow

Yeah, same here, but it was great while I used it. It had some terrific code suggestions, and really helped me find things. But talk about slow...

I hear refactoring is built into VS 2005. Anyone tried it?

wayne avatar
wayne
User
Posts: 611
Joined: 07-Apr-2004
# Posted on: 11-Jan-2005 14:17:28   

Our team uses the resharper - it takes forever to load in the beginning -Each desktop PC here has 1 Gig of RAM and that does seem to do the trick. wink

But the resharper can't fix the bugs in the .net IDE.

Sam avatar
Sam
User
Posts: 95
Joined: 30-Jun-2004
# Posted on: 11-Jan-2005 20:04:01   

CodeRush now has beta refactoring that works well. Plus, CodeRush itself is really great.