Is there a way to add a confirmation dialog when clicking an asp:button that only triggers postback if the user clicks "OK"? Here's what I have so far:
OnClientClick="if(confirm('Format the hard disk?'))
alert('something');
else alert('something else')"
The issue I'm facing is that regardless of whether "OK" or "Cancel" is clicked, the postback still occurs. How can I modify this to only trigger the postback on "OK"?