I'll make this generic:
C# and ASP.Net.
Lets pretend its a delete function:
I want to create a pop-up box client side that asks the user if they're sure they want to delete the record. If they click "OK", thats fine, delete.
If they click "Cancel", I want to perform a separate action. I want to capture the "Cancel" click, and call a separate method.
I have tried:
BtnDelete.Attributes.Add("OnClick", "return confirm('Are you sure you want to delete this?');");
But THAT PROVIDES NO CASE FOR THE CANCEL CLICK except to do nothing (cancel the box).
I have also tried:
var s = window.confirm("Button Value Test");
<%CancelClick();%> //<------This bit!
This should not be this difficult. All I want is a popup box client side that has two outcomes, true and false, and to perform separate and independant actions depending on the outcome.