I have downloaded a lot of Asp.net demos based on VS2003 (and VS2002). I am using VS2005. When I use these demos, basically most of the Asp.net projects based on VS2003 cannot be loaded because a few files cannot be converted. I have been depressed for a long time, and finally I found it. Solution:
The biggest difference between Asp.net's VS2005-based project and previous versions of the project is that partial classes (partial) are used instead of code hiding (Codebehind).
So the method I took was:
1. Open the project by opening the website. In this way, VS2005 will also perform the conversion and report an error, but unlike the direct solution that cannot be loaded, this time it expands all the files of the website. If you run the project now, it will not succeed.
2. Open the filename.aspx file to the source code view, and change the attribute "Codebehind" in the @Page directive to "CodeFile".
3. The corresponding Codebehind file filename.aspx.cs will be inherited from System.Web. The class definition of UI.Page is preceded by the partial keyword.
4. Run the project, it will prompt you that the definition of controlname is already included in filename.aspx, track the error to filename.aspx.cs, and delete the duplicate definitions that indicate errors.
5. Then repeat steps 2-4 until all files have been changed, and then run the project and it should run successfully. However, there may be a few warnings saying that such and such is obsolete, so don't worry about it.
I used this method to successfully convert all the old stubborn ones (including projects from 2003 and 2002), and it really works every time. This is just the method I summarized myself. Maybe someone has a better method. If there is a better method, please give me some advice.
http://www.cnblogs.com/nihgwu/archive/2006/08/11/474604.html