Association between aspx files and codebehind files in the Asp.net Project

Source: Internet
Author: User
We often encounter aspx and aspx after the conversion web project. CS is a parallel display, rather than clicking the plus sign before aspx to display Aspx. CS, although it does not affect the function, it is always uncomfortable. searched,
Directly modify the project file. csproj and find the definition of files such as Aspx. CS, as follows:
<Compile include = "test. aspx. cs">
<Subtype> aspxcodebehind </subtype>
</Compile>
Add a subnode to the compile node: <dependentupon> test. aspx </dependentupon>. The final result is as follows:
<Compile include = "test. aspx. cs">
<Subtype> aspxcodebehind </subtype>
<Dependentupon> test. aspx </dependentupon>
</Compile>

Re-load the project. If the amount is large, you can consider writing ProgramProcess csproj, but it is best to back up the csprojc file first.

Another simpler method is to create a new project and put aspx and Aspx. the CS file is copied to the project at the same time. At this time, the project Automatically Establishes a correspondence relationship based on the file name, saving the trouble of manual modification.

 

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.