Charlie,
put this javascript function on the client side of your aspx page
<script>
function confirmSubmit() { var sure=confirm("Are you sure you wish to
continue?");
if (sure) return true ; else return false ; }</script>
and call it from the onclick event of your server control for Save say
BtnSave.
You can type it in the tag itself
onclick="return confirmSubmit();"
or
in the Page_Load
BtnSave.Attributes.Add("onclick","return confirmSubmit();");
Regards,
Marshal Antony
http://dotnetmarshal.com
"Charlie@CBFC" <ch*****@comcast.net> wrote in message
news:OI**************@TK2MSFTNGP12.phx.gbl...
Hi:
when the user selects the save button (asp control) to intiate a
postback, I would like to pop up a javascript alert box to confirm if he really
wants to save. If he selects no from alert dialog, I would like to cancel the
postback. How do you do this?
Thanks,
Charlie