Where is [file].aspx.designer.cs in native VS2005 Web Project?
Just had a further reading of the migration from ASP.NET 1.1 website to ASP.NET 2.0 one. ScottGu's post listed his Web Application Project, which is a good resource for understanding these topics.
In ScottGu's tutorial article about migrating from ASP.NET 1.1 website to ASP.NET 2.0 one, he mentioned those [file].designer.cs files generated while convering the 1.1 compatible web project, which makes me curious about where were those [file].designer.cs files of native VS2005 web project? basically I can only see those partial classes for my own written code, where were those designer generated control definations go?
By asking Google about this, found out some info via this forum thread and leads me to Rick Strahl's post talking about Page Inheritance in ASP.NET 2.0. According to his post about the new page class creation model, all the designer generated codes are now auto generated by asp.net compiler at compile time. as Rick stated:
Note that a partial class does not contain control definitions or InitializeComponent that usually hooks up the events. ASP.NET generates the surrogate partial class at compile time that represents the ASPX page code ASP.NET generates another partial class that contains all the control definitions, the event delegate hookups and setting of Page settings (like EnableSessionState, Trace etc.). Both of these partial classes combine to make up the base class that the ASPX page inherits.
That should be the answer why I am not able to find those so-called [file].designer.cs files in native web projects in VS 2005, and Rick's post is a good one to get further understanding of the new ASP.NET 2.0 inheritance model.
Technorati Tags: programming , asp.net