 <p>If i'm not wrong. see below can help you up or not.</p> <pre><code>&lt;script type="text/javascript"&gt; function Confirmation() { var rowQuestion = confirm("Are you sure you want to confirm?"); if (rowQuestion == false) { return false; } return true; } &lt;/script&gt; </code></pre> <p>and the aspx will be:</p> <pre><code>&lt;asp:Button Text="Confirm Training" OnClientClick="return Confirmation();" ID="btnConfirm" OnClick="btnConfirm_Click" runat="server" /&gt; </code></pre> <p>confirm at the javascript "confirmation" first, then, only call the btnConfirm_click code behind.</p>