Doing a conditional submit
<p>I have a basic asp.net submit button like so:</p>

<p><code>&lt;asp:Button ID="test" runat="server" onclick="test_Click" /&gt;</code></p>

<p>I have a javascript method that I want to run before submitting, but I cannot set it up to do so. Anyone know how? The javascript method returns true/false at the end where true = submit.</p>

<p>Thanks for the replies, but I have already tried what you said and it didn't work. Here is my markup:</p>

<p><code>&lt;asp:Button OnClientClick="return checkInput();" ID="test" runat="server" onclick="test_Click" /&gt;</code></p>

<p>The javascript method runs, but even when it returns true the page doesn't post back.</p>

<p>Edit: Nevermind, there was something wrong with the javascript method.</p>
