1. Background pop-up prompt information method
Response.Write ("<scripttype=" Text/javascript ">alert" The data you are querying does not exist! ');</script> ");
Popup message, but the page blank Page.registerclientscriptblock ("Tishi", "<scripttype=" Text/javascript ">alert (' The data you are querying does not exist '); </script> ");
Popup message, but the page blank page.registerstartupscript ("Tishi", "<scripttype=" Text/javascript ">alert (' The data you are querying does not exist ');< /script> ");//Expired,
Popup message, page is not blank clientscript.registerclientscriptblock (this. GetType (), "Tishi", "<script type=" Text/javascript ">alert (' The data you are querying does not exist! ');</script> ");
Popup message, but page blank clientscript.registerstartupscript (this. GetType (), "Tishi", "<script type=" Text/javascript ">alert (' The data you are querying does not exist! ‘);
</script> ");
Popup message, page is not blank
In vs2005 you need to introduce System.Web.Extensions.dll Scriptmanager.registerclientscriptblock (This.btntishi, typeof (Button), " Tishi "," alert (' The data you are querying does not exist! '); ", true);
Popup message, but page blank Scriptmanager.registerclientscriptblock (this, this. GetType (), "Tishi", "alert (" The data you are querying does not exist!) '); ", true);
Popup message, but the page blank, this means page scriptmanager.registerstartupscript (This.btntishi, typeof (Button), "Tishi", "alert (' The data you are querying does not exist! '); ", true);
Popup message, page is not blank scriptmanager.registerstartupscript (page,typeof (page), "Tishi", "alert (" The data you are querying does not exist!) '); ", true);
Pop-up Tip message, page not blank Scriptmanager.registerstartupscript (this, typeof (_default), "Tishi", script, True);
Popup message, page is not blank, this means page
The backend obtains the confirm return value and has the selected execution statement block C # side: protected void Page_Load (object sender, EventArgs e) {if (! IsPostBack) {this.btnTiShi.Attributes.Add ("onclick", "Tishi ()");}}
protected Voidbtntishi_click (object sender, EventArgs e) {if (This.hidevalue.Value = = "1") {Response.Write ("Success");} else {Response.Write ("Failue");}}
JS End: <script type= "Text/javascript" > Function Tishi () {if (Confirm (' Are you sure you want to delete? ') {document.getelementbyidx_x (' Hidevalue '). value= ' 1 ';//window.location.href=window.location.href;} else { document.getelementbyidx_x (' Hidevalue '). value= ' 0 '; }} </script>
"Reprint" ASP. NET Background popup prompt box