Notes when using the template page master

Source: Internet
Author: User
1. Get the Page Control ID
The page access control after the master node cannot directly retrieve the Control ID. The cause of this problem is that the control with the same ID can exist simultaneously on the master node and the page where the master node is used, however, it is not allowed on a separate page.
Therefore, when we view the source file through a browser, we will find that the two identical IDs are not the same and are not the original IDs, in this case, only one clientid is added to the Control ID to obtain the Client ID;
Method for obtaining the ID of an individual file: var MSG = Document. getelementbyid ('lblmessage ');
Use the master page to obtain the ID: var MSG = Document. getelementbyid ("<% = This. lblmessage. clientid %> ");

2. The relationship between <asp: contentplaceholder> and <asp: content>. The ID of <asp: contentplaceholder> must be the same as the contentplaceholderid of <asp: content>.

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.