Click to See Complete Forum and Search --> : How to avoid Server Side Event Conditionally


Manojk
January 24th, 2003, 10:46 PM
Hi,
In my pageload event, dynamically controls are added to the form depending on some conditions. I have one button like

"<input type="button" id="btnDelete2" runat="server" value="Delete All Selections" NAME="btnDelete2" onclick="MsgOkCancel();">"

This button also has Server side click event.

Now My problem is when a user clicks this button, using javascript , I am showing him a confirm Message box. If user says OK then further processing should be done else nothing should happen. BUt currently, even he clicks "Cancel", server side page_load as well as button_click event is fired. I need to avoid submitting of page, if user has clicked cancel on the confirmation message box.

ANy pointers towards achieving this will be of great help.

TIA,
Manoj