A simple method of converting asp.net from VS2003 and VS2002 engineering to VS2005 Engineering

Source: Internet
Author: User
asp.net|vs2003| Conversion

I've got a lot of demos based on VS2003 (and VS2002) asp.net. And I used the VS2005, I use these demo, basically most of the VS2003 based on the ASP.net project because a few files can not be converted to load the project, I also for some depressed for a long time, and finally let me find a solution:

The biggest difference between asp.net based VS2005 Engineering and previous versions of the project is the substitution of the partial class (partial) for code-behind (codebehind).

So the way I took it was:

1. Open the project by opening the website. This VS2005 will also be converted, and will also complain, but unlike a direct hit solution cannot be loaded, this time it expands all the files on the Web site. If you run the project now, it will not succeed.

2. Open the Filename.aspx file to source code view, change the attribute "Codebehind" in the @page directive to "CodeFile",

3. Filename.aspx.cs with this corresponding codebehind file, add the partial keyword to the class that inherits from System.Web.UI.Page.

4. Run the project, it will prompt you to include the definition of controlname in the filename.aspx, track errors to Filename.aspx.cs, and delete the duplicate definitions that are indicated to be wrong.

5. Then repeat 2-4 steps until all the files have been changed, and then run the project should be able to run successfully. But there may be a few warnings that So-and-so is out of date and doesn't have to worry about it.

I used this method to convert the old stubborn (including 2003 and 2002 of the project) to a successful conversion, really is a success. This is just my own summary of the method, perhaps someone has a better way, if there is a better way to please advise.



Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.