[Go] in the ASP. Foreground and background pop-up prompt box

Source: Internet
Author: User

first, pop-up prompt box in the foreground 1. Click the "A" marker or the "control button" pop-up Prompt box <asp:linkbutton id= "Lbtndel" runat= "server" onclientclick= ' <%# ' if (!confirm ("Are you sure you want to unsubscribe?") ")) return false;" %> ' text= "delete"/> 2. Method Two: <asp:linkbutton id= "Lbtndel" runat= "Server" onclientclick= "return confirm (' Are you sure you want to unsubscribe? ‘);" text= "Delete"/> second, in the background pop-up prompt box 1, the output of the prompt box page no refresh if (!this. IsStartupScriptRegistered ("Ordering Tips"))
{
This. RegisterStartupScript ("Order Prompt", "<script>alert ('" +returnstr+ "');</script>");
} 2. The Output prompt box page refreshesResponse.Write ("<script>alert (' Operation succeeded ');</script>"); 3. Back to Previous pageResponse.Write ("<ahref= ' javascript://history.back (0); ' > Return </a> ")Note: 1,) The semicolon in the above code ";" Must not be less, otherwise the code will not execute successfully, the parameters in the alert (Stringpara) method are strings;2.) If you want to jump to another page after clicking the OK button of the box, simply add the window.location.href= "url" after the semicolon of the above code, and the URL will be the URL of the page you want to jump to. Reference Articlesin the ASP. NET foreground and background pop-up prompt box ,Xiaofoyuan

[Go] in the ASP. Foreground and background pop-up 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.