Visual Studio.net...is somehow deleting my this.Load +=....?

  • Thread starter Thread starter DDK
  • Start date Start date
D

DDK

Does anyone know why : this.Load += new
System.EventHandler(this.Page_Load); gets deleted from the
InitializeComponent()

I've been finding that this is missing from some of my pages, which makes
the pages not work correctly or else unsecure. Any ideas why.

Thanks,

d.



/// <summary>

/// Required method for Designer support - do not modify

/// the contents of this method with the code editor.

/// </summary>

private void InitializeComponent()

{

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

}

#endregion
 
VS.NET does this with many of the vs.net generated methods if you start
messing with the Web Form Designer generated code sections. Once you've
messed with the Web Form Designer generated code sections once in a
code-behind, don't be surprised if it happens again on that page. However,
other pages should be 100% unaffected. This happens to me frequently when
working with the DataGrid. All of sudden, the Edit/Update/Delete methods
are not wired up correctly.

HTH,

Mark
 
Back
Top