"Reprint" ASP. NET Background popup prompt box

Source: Internet
Author: User
Tags blank page

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

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.