Summary of several methods for ASP.net alert pop-up alert information

Source: Internet
Author: User

  This article is mainly on the asp.net alert pop-up tips of several methods to summarize the introduction, the need for friends can come to the reference, I hope to help you.

1.clientscript.registerstartupscript (GetType (), "message", "<script>alert" (' The first way, no screen! ');</script> ");   2.httpcontext.current.response.write (' <script>alert (' The second way, there screen! ') </script> ");   3.public static void Show (System.Web.UI.Page page, string msg)     {     ,   Page. Clientscript.registerstartupscript (page. GetType (), "message", "<script language= ' JavaScript ' Defer>alert ('" + MSG. ToString () + "');</script>");     Show (This, "The third Way, no screen, no deformation!") ");   4.response.write (the fourth way, there are screen!) ') </script> ");   5.window.showmodaldialog (' xxx.aspx ', ', ', ' Dialogwidth:429px;dialogheight:200px;location:no,menubar:no, Toolbar:no,status:no ');   6.page.clientscript.registerstartupscript (This.gettype (), "", "<script>window.open ('.. /issue/issueallcomment.aspx ');</script> "); can be resolved.   7. Functions that use AJAX components are as follows: System.Web.UI.ScriptManager.RegisterStartupScript (this, this.) GetType (), "opennewWindow "," Alert (' Popup content! '); ", true);   8. Place a control on the last line of the body of the page and assign a value to the control in the code page, such as:   label. text= "<script>alert (' Popup content! ); </script> ";  
Related Article

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.