Fog Creek Software
Discussion Board

Welcome! and rules

Joel on Software

Odd behavior in VS.NET

In my Webform codebehind page something strange happens sporadically...

this.Load += new System.EventHandler(this.Page_Load);

in InitializeComponent magically disappears and I have to manually put it back in.

Has anyone else seen this and does it mean that i've set some preference somewhere to a horribly wrong value?

Charles Reich
Monday, March 3, 2003

You are not imagining things.  This is a known bug.

Avoid the designer like the plague.

It happens mainly when you switch to the designer and then switch away before it finishes loading.  It will also erase all your event bindings for button clicks and well, basically all the events wired up in that function.

They issued a fix for it, but I think the fix only applied to Visual Basic.NET because I still get that behavior after applying the fix.

Richard Ponton
Wednesday, March 5, 2003

Thanks Richard.  At least it is some comfort to know that I am not the only one...

I already avoid designer view anyway, but get that glitch at random times.  I'll keep my eye out for the fix for C#.

Charles Reich
Thursday, March 6, 2003

It helps to a) use source control religiously or b) copy/paste the entire machine-generated code region into a comment periodically.

Richard Ponton
Monday, March 10, 2003

*  Recent Topics

*  Fog Creek Home