How to get javascript confirm box after validating the form data in asp.net?
<p>I am facing a problem in my asp.net web application that i need to display a java script confirmation box on click of <strong>Update</strong> button and this as per requirements given to me.</p>

<p>Currently I am using onclient click</p>

<pre><code>&lt;asp:Button ID="btnCustomerUpdate" runat="server" CssClass="applybuttonstyle" 
            Text="Update" onclick="btnCustomerUpdate_Click" 
            OnClientClick="return confirm('Do you really want to update?');"/&gt;
</code></pre>

<p>It's working fine but the problem is i also applied some validation controls on my form fields so if a user leave any field blank and click update button then it shows javascript confirm box and the validation message below that form field.</p>

<p>And it is not desired behavior it should not show the confirmation box until unless all validation are passed.</p>

<p>I hope this is due to because i am using this on client click so please tell me a better solution for that.</p>

<p>Thanks in advance.</p>
