When compiling ASP. NET, the prompt "Please make sure that the class defined in this Code File matches the" inherits "attribute, and the base class (such as page or usercontrol) of this class extension is correct.

Source: Internet
Author: User

When compiling ASP. NET, the prompt "Please make sure thisCodeThe class defined in the file matches the "inherits" attribute, and the base class of the class extension (

For example, page or usercontrol) is correct .", 1. The name of inherits on the ASPX page is different from that in the code of Aspx. CS.

(Generally, one of these two pages has been modified, or all other page code has been copied.) 2. You may have added a blank name.

And then compile normally, but I want to add the namespace. Solution: add the namespace after the inherits in the ASPX page

Name. For example, if the namespace is inherits = "Index" and the namespace is category, change it to inherits = "category. Index ".

.

 

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.