About the pop-up dialog of C # .NET, C # determines whether or not to perform an event based on YES / NO returned by JavaScript.
I have seen a lot of research on this area.
It is found that the following code is the most simple and easy, so you have shared it.
ASPX
asp: button>
asp: button>
ASPX.CS
Protected system.Web.ui.webcontrols.button btndel;
protected system.web.ui.webcontrols.button btnprt;
Private Void Page_Load (Object Sender, System.EventArgs E)
{
IF (! ispostback)
{
}
BTNDEL.ATITRIBUTES.ADD ("onclick", "RETURN CONFIRM ('deleted?');");
Btnprt.attributes.add ("onclick", "RETURN CONFIRM ('printing?');");
}
Private void btnprt_click (object sender, system.eventargs e) {//}
Private void btndel_click (object sender, system.eventargs e) {}