Stopping server side button click event from client side
Posted on 2008-06-18
I have a server side button control. I want to show an Ok-cancel message from client side when button is clicked, server side event should be handled according to that.
Here is my button code.
<asp:Button ID="btnTest" runat="server" Text="Test Only" onclick="btnTest_Click" OnClientClick="ClientFun()"/>
I dont want the server side event btnTest_Click to happen if user clicks cancel in the client function ClientFun.
Is this possible? Or is there any way to achieve this?