Asp. NET to generate background scripting problem solution

Source: Internet
Author: User
Asp.net| Background | script | solve | problem

Using ASP.net to develop Web applications often uses a pop-up dialog box, which I usually write.

Response.Write ("", "<script>alert") (' pop-up window! ');</script> ");

But the problem is that when the dialog box pops up, the whole page is white, and the progress bar is moving slowly, so you're OK after you click OK, why?

So I understand that the program is executed sequentially, when executed to the above statement, the program began to wait for the user's operation, and then down to execute, I did not notice at the beginning, but later the more ugly, how to think also have to change it over, let it pop up when the page still has content

Later, the teacher told me to use the following method can be

Page.registerstartupscript ("", "<script>alert") (' pop-up window! ');</script> ");

That's it!



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.