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>.