BUG: The page event handler may insert an incorrect event name when you automatically generate a page event handler (318279)



The information in this article applies to:

  • Microsoft Visual C# .NET (2002)
  • Microsoft Visual C# .NET (2003)
  • Microsoft Visual C# 2005, Express Edition

This article was previously published under Q318279

SYMPTOMS

When you automatically generate a page event handler, the automatically-generated page event handler is named WebForm1_Load, but the Page_Load event handler is connected to the function.

RESOLUTION

To resolve this problem, replace the WebForm1_Load event name with Page_Load in the WebForm1.aspx.cs file.

STATUS

Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.

MORE INFORMATION

Steps to Reproduce the Behavior

  1. In Visual Studio .NET or in Visual Studio 2005, create a new Visual C# ASP.NET Web Application project.
  2. Open the code-behind file for the Webform1.aspx file, and then delete the Page_Load function.
  3. Switch to Design view for the Webform1.aspx file.
  4. In the Properties window, select WebForm1 from the drop-down list.
  5. Click Events.
  6. Double-click the Load event in the Properties window. Although you expect a new function named Page_Load to be created, the new function is named WebForm1_Load.

Modification Type:MajorLast Reviewed:1/17/2006
Keywords:kbtshoot kbprb kbbug kbpending kbWebForms KB318279 kbAudDeveloper