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> ";