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