1.ClientScript.RegisterStartupScript(GetType(),"message","<script>alert('第一种方式,无白屏!');</script>");
2.httpcontext.current.Response.write ("<Script> Alert ('' Second method, white 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, "Third method, no white screen, no deformation!");
4.Response.write (<Script> Alert ('Fourth way, with white 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/IsueAllComment.aspx'); </script>");
It can be solved.
7.
Use the function of the AJAX component, as follows:
System.Web.UI.ScriptManager.RegisterStartupScript(this, this.GetType(), "opennewwindow", "alert('弹出框内容!');", true);
8..
Place a control on the last line of the body of the page and assign the control value in the code page, such as:
label.text = "<script> Alert ('pop -up box content!); </script>";