b/s does not like C/s as a MessageBox can pop up the prompt box, but can be through the "Alert" JS to pop up the message, or through some variant of the JS method.
protected voidMessage_click (Objectsender, EventArgs e) { //First KindResponse.Write ("<script Language=javascript>alert (' First popup box '); </"+"script>"); //The second KindPage.registerstartupscript ("","<script language= ' javascript ' >window.alert (' Second popup box ');</script>"); //Third KindClientScriptManager ScriptManager =((Page) System.Web.HttpContext.Current.Handler). ClientScript; Scriptmanager.registerstartupscript (typeof(string),"","alert (' Third popup box ');",true); //Fourth TypePage.ClientScript.RegisterStartupScript (Page.gettype (),"message","<script language= ' javascript ' Defer>alert (' Fourth popup box ');</script>");}
The above four methods are very simple, in fact, the simpler way is to encapsulate them into a method as follows.
//pop-up box Public voidAlert (stringstr_message) { //First KindResponse.Write ("<script Language=javascript>alert (' First popup box '); </"+"script>"); //The second KindPage.registerstartupscript ("","<script language= ' javascript ' >window.alert (' Second popup box ');</script>"); //Third KindClientScriptManager ScriptManager =((Page) System.Web.HttpContext.Current.Handler). ClientScript; Scriptmanager.registerstartupscript (typeof(string),"","alert (' Third popup box ');",true); //Fourth TypePage.ClientScript.RegisterStartupScript (Page.gettype (),"message","<script language= ' javascript ' Defer>alert (' Fourth popup box ');</script>");}
When the frequency of use is relatively high, this is very convenient. You just need "Alert" for a moment. Isn't it convenient? If you feel good, try it quickly.
Asp. Several popover hints in net