Hello Steven,
Yes, the IDE is generating the PreInit in OnInit, more prcesely in the
InitializeComponent that is sent by preInit.
My projet is a Web Application, I am using Visual Studio Pro with SP1 on a
XP laptop, using C#, following are informations from VS.
For majority of my aspx pages AutoEventWireUp is turned off.
I followed this process: open the aspx page, choose Design mode, then from
right click menu choose View Component Designer (I have not found another
way to display the page properties with handlers), then right click again
and Properties, then Events button, then double click in the PreInit.
Switcing back to the code windows, I cans see the generated code:
#region Web Form Designer generated code
override protected void OnInit(EventArgs e)
{
InitializeComponent();
base.OnInit(e);
}
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.PreInit += new System.EventHandler(this.DesktopDefault_PreInit);
this.Load += new System.EventHandler(this.Page_Load);
}
#endregion
private void DesktopDefault_PreInit(object sender, EventArgs e)
{
}
It seems a bug.
Here are My VS infos.
Microsoft Visual Studio 2005
Version 8.0.50727.762 (SP.050727-7600)
Microsoft .NET Framework
Version 2.0.50727
Installed Edition: Professional
Microsoft Visual Basic 2005 77626-009-0000007-41381
Microsoft Visual Basic 2005
Microsoft Visual C# 2005 77626-009-0000007-41381
Microsoft Visual C# 2005
Microsoft Visual Studio Tools for Office 77626-009-0000007-41381
Microsoft Visual Studio Tools for the Microsoft Office System
Microsoft Visual Web Developer 2005 77626-009-0000007-41381
Microsoft Visual Web Developer 2005
Microsoft Web Application Projects 2005 77626-009-0000007-41381
Microsoft Web Application Projects 2005
Version 8.0.50727.762
Crystal Reports AAC60-G0CSA4B-V7000AY
Crystal Reports for Visual Studio 2005
Microsoft Visual Studio 2005 Professional Edition - ENU Service Pack 1
(KB926601)
This service pack is for Microsoft Visual Studio 2005 Professional Edition -
ENU.
If you later install a more recent service pack, this service pack will be
uninstalled automatically.
For more information, visit
http://support.microsoft.com/kb/926601
SQL Server Analysis Services
Microsoft SQL Server Analysis Services Designer
Version 9.00.2047.00
SQL Server Integration Services
Microsoft SQL Server Integration Services Designer
Version 9.00.1399.00
SQL Server Reporting Services
Microsoft SQL Server Reporting Services Designers
Version 9.00.1399.00