ASP. NET code hiding Mechanism

Source: Internet
Author: User
1. Before ASP. NET 2.0, CodeThe page and display layer are mainly associated by class inheritance, but the problem is caused by inheritance. Because inheritance is unidirectional, so to use the variables declared by one class in another class, you must declare the variables again and use the same ID.
2. ASP. NET Versions later than 2.0 use partial classes to complete this task. Declare each physical file as a partial class of a specific class to achieve unified compilation, that is, as long as a variable is declared in one of the partial files, it can be used in other partial files, very convenient.

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.