I have an asp:Button
on my webpage, and it calls into a JavaScript function and a code-behind method. The latter makes a call to navigate to another page. In the JavaScript function, I'm checking for a condition. If this condition is not met, I want to abort the navigation so that the OnClick
method is not called. Is this possible?
<asp:Button OnClick="Button_Click" ID="Action1" OnClientClick="SaveValues()"
Text="Action1" CssClass="specialButton" runat="server" />