Page aliasing after ASP. NET Popup Box

Source: Internet
Author: User

1, remove language= ' javascript ', the problem is still

2, after adding Response.Write ("<script>document.location=document.location;</script>"); This sentence, tried, found that the style is unchanged, but the page is loaded from the new, ViewState was emptied (this can not, the user changes have not been saved yet)

3, this. RegisterStartupScript ("", "<script language=javascript>alert (' Please save your edits first! ') </script> ");

instead of you.

Response.Write ("<script language= ' JavaScript ' >alert (' please save your edits first! ');</script> ");

The best way:

Using RegisterStartupScript is to output the script to the client, which is better than Response.Write to enter the script at the bottom of the page without affecting the style, but sometimes VS2005 prompts for a long warning, and the workaround is written as:

Clientscript.registerstartupscript (this. GetType (), "", "<script language=javascript>alert (' Please save the changes first! ') </script> ");

Page aliasing after ASP. NET Popup Box

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.