Flying Pigeon book: About rendercontrol manual call

Source: Internet
Author: User

To learn more about how to manually call the rendercontrol, manually call the rendercontrol method of the control, and do not execute the onprerender method. Some webpages need to dynamically create server controls in the background andCodeWrite to the specified htmltextwriter.

 

If you only call the rendercontrol method to output the HTML content of the server control, but it does not execute onprerender, the server control usually overwrites the onprerender method to implement many important functions. we cannot discard it. flying Pigeon book: http://www.freeeim.com/

The solution is to publish a method in the server control. You can call the onprerender method in the method. Before manually calling the rendercontrol method, you can manually call this public method.

 

Another solution is to create a container control and use the Container Control controls. add loads our control and then adds the container control to the page. Be sure to set the CSS style of the Container Control to style = "display: none" so that the page effect will not be affected.

On the client side, you can reference the HTML Flying Pigeon text in the preceding container control.

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.