I have upgraded a MS Visual Studio Application from VS 2003 to VS 2008 (Targeting .NET 2.0). As part of the conversion process the wizard said I needed to take the additional step of Converting my Project to a Website by Right-Clicking and blah blah blah...
I didn't follow directions and the web application seems to be working fine.
My question is, should I be concerned about pushing this to a production system? What exactly is going on here?
There are two types of web applications in ASP.NET: The Web Site and Web Application Project. The difference between the two are discussed here:
Difference between web site and web applications in Visual Studio 2005
Convert to Website allows you to convert a Web Application Project to a Web Site.
Visual Studio 2003 used the Web Application Project style, but initially VS2005 only supported web sites. VS2005 SP1 brought back Web Applications.
If you don't want to convert your project to a web site, apply SP1 if you're using VS2005. VS2008 can support either.
Convert to Website moves all of your control declarations from the main page class to a secondary file (yourpage.aspx.designer.cs).
It does this by using a partial class. That is, the same class for your page, but split into two seperate files.
This allows the VS2k5 (and VS2k8) designer to generate code for your pages without dumping generated code spaghetti into the main class file.
You don't need to do this step to build the project, but if you continue to maintain the project you will want too.
EDIT:
Hey look, MSDN backs me up:
To convert the code to use the partial-class model
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With