Class in app_code cannot be referenced

Source: Internet
Author: User

Why can't I reference the class in app_code when vs2005 is installed with the SP1 Patch? "Add ASP. ". Net folder" does not contain app_code. Adding a common folder and naming it as app_code can no longer be referenced by adding class files. What is the problem?
Program








In a web application, you cannot add an ASP. NET folder by right-clicking project> Add->. Because the app_code in the Web application does not exist. However, you can manually create a folder and name it app_code. In this way, the app_code created in the website looks the same. Don't be happy. It's not that simple. When you create a class in app_code, you will find no smart prompts. When the page is referenced in the background, an error is reported, indicating that the reference does not exist. The solution is to select your class file and change the "generate operation" default "content" in the "advanced" attribute to compile. This is enough. You can also add "app_localresources" to the Web application project. You can add classes in this folder without adding the app_code folder. You can also create any folder or directly add classes without folders. You only need to modify the "generate operation" of the class's advanced attributes to "compile.

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.