JavaScript confirm cancel button still posting
Cancel button on the confirm dialog still causing post back and calling server side button event. <asp:Button ID="btnSubmit" runat="server" CssClass="CommandButton" Width="110px" OnClientClick="confirmPayment();" UseSubmitBehavior="false" Text="Submit Payment" OnClick="btnSubmit_Click"></asp:Button> function confirmPayment() { var isOkay = confirm("Confirm Payment?"); if (isOkay) { return true; } else { return false; } } I tried to debug my code and i can … Read more