views:

18

answers:

0

Hello All,

I have an aspx page where I have wired up a client side event(OnClientClick) as well as server side event(OnClick) for a button.

I am prompting the user with a confirm dialog box using javascript in the client side event while in the server side event I do my set of operations. Here is a code snippet of what am trying to achieve

<asp:Button ID="Button1" OnClientClick=" return confirm('Are you sure you want to do this operation?');" runat="server" OnClick="Button1_Click" Text="Click here" ValidationGroup="URLValidator" />                                    

When I click the button and click 'OK' from the prompt, the server side event should be fired(which is not getting fired in my case). Where am I going wrong? Any insights?