Solution to ASP. NET background script generation

Source: Internet
Author: User
A pop-up dialog box is often used to develop Web applications using ASP. NET.
Response. Write ("", "<SCRIPT> alert ('pop-up window! '); </SCRIPT> ");
But there is a problem in this writing: When the dialog box pops up, the entire page is white, and the progress bar is moving slowly. It will be fine after you click OK. Why?
I understand it like this, ProgramIt is executed in sequence. When the preceding statement is executed, the program starts to wait for the user's operation and then runs it down. I didn't pay attention to it at the beginning, but the more I see it, the more ugly it looks, you have to change the content to make it pop-up.
Later, the teacher told me to use the following method.
Page. registerstartupscript ("", "<SCRIPT> alert ('pop-up window! '); </SCRIPT> ");
That's all!

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.