Updatepanel and usercontrol parsing problems

Source: Internet
Author: User

Currently, we are working on a project. During the process, we found that the usercontrol placed in updatepanel had some problems during parsing.

 

Code

 

<Uc1: AAAA/> and <UC2: RRRR/> are two usercontrols used for testing. The buttons are used to prevent uc1 from being displayed and UC2 from being displayed. uc1 is displayed by default during loading, UC2 does not display (visible). When there is no outer updatepanel, load it and view the page source code. At this time, you will find that only uc1 is parsed and UC2 is not parsed, after you click the button, you will find that you are viewing the source code, only parsing UC2, but not parsing uc1. This is of course the same as my original intention, but when the outer layer contains updatepanel, after the initial loading or clicking the button, you cannot find the UC2 shadow when viewing the page source code, but the actual content of UC2 is displayed on the page, in this way, when UC2 contains a Javascript script, it cannot find the object resource and reports an error.

I have not figured out the reason yet. If any expert knows the reason, please leave a message to explain it. I am very grateful. I will continue to study this question to see why?

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.