ASP.net background pop-up prompt box

Source: Internet
Author: User
ASP.net background pop-up prompt box
1. Background pop-up prompt information method
Response.Write ("<scripttype=" Text/javascript) >alert (' The data you are querying does not exist. ');</script> ");
Pop-up prompts, but page blank
Page.registerclientscriptblock ("Tishi", "<scripttype=" Text/javascript ">alert" (' The data you queried does not exist '); </script > ");
Pop-up prompts, but page blank
Page.registerstartupscript ("Tishi", "<scripttype=" Text/javascript ">alert" (' Your queried data does not exist ');</script> ") ;//has expired,
Pop-up prompts, page not blank
Clientscript.registerclientscriptblock (this. GetType (), "Tishi", "<script type=" Text/javascript ">alert" (' The data you are querying does not exist. ');</script> ");
Pop-up prompts, but page blank
Clientscript.registerstartupscript (this. GetType (), "Tishi", "<script type=" Text/javascript ">alert" (' The data you are querying does not exist. ');</script> ");
Pop-up prompts, page not blank



The need to introduce System.Web.Extensions.dll in VS2005 must be added
Scriptmanager.registerclientscriptblock (This.btntishi, typeof (Button), "Tishi", "Alert" (' The data you are querying does not exist. '); ", true);
Pop-up prompts, but page blank
Scriptmanager.registerclientscriptblock (this, this.) GetType (), "Tishi", "Alert" (' The data you are querying does not exist. '); ", true);
Pop-up prompts, but page blank, this represents page
Scriptmanager.registerstartupscript (This.btntishi, typeof (Button), "Tishi", "Alert" (' The data you are querying does not exist. '); ", true);
Pop-up prompts information, the page is not blank; The method has succeeded
Scriptmanager.registerstartupscript (Page), "Tishi", "Alert" (' The data you are querying for does not exist. '); ", true);
Pop-up prompts, page not blank
Scriptmanager.registerstartupscript (This, typeof (_default), "Tishi", script, True);
Pop-up prompts, page not blank, this represents page
Background gets the confirm return value and has the selected execution statement block
C # End:
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
Related Article

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.