Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Java confirm
Message
General information
Forum:
ASP.NET
Category:
Web forms
Title:
Miscellaneous
Thread ID:
00939118
Message ID:
00939415
Views:
11
>I have an order system where the user can cancel the order. (This is good) There is a confirmation popup with "Are you sure you want to cancel?" the buttons say "OK" and "Cancel" (This is bad.) since cancel means cancel canceling or keep ordering. How can I get yes and no as text in the confirm popup?

Joe,

Below is the syntax to add the client side code to the button:
btnName.Attributes.Add("onclick", "return confirm('Are you sure you want to cancel?');")
The first parameter is the event to handle and the second parameter is the client-side (javascript) code to execute. If the user clicks cancel on the dialogue then the postback does not occur. In-turn the server side event does not happen.

Hope that helps...
Previous
Reply
Map
View

Click here to load this message in the networking platform