Execute javascript function when click on ASP.NET button
<p>I have a button :</p>

<pre><code>&lt;asp:Button 
    runat="server" 
    ID="btNew" 
    OnClick="ButtonNew_Click"
    Text="New" /&gt;
</code></pre>

<p>I have a, the OnClick method :</p>

<pre><code>protected void ButtonNew_Click(object sender, EventArgs e)
{

}
</code></pre>

<p>On the same page (.aspx), I have a javascript function : </p>

<pre><code>function MyCheck()
{
  //return true or false
}
</code></pre>

<p>I'd like when I click on the button execute the javascript function (<code>MyCheck()</code>) if true execute <code>ButtonNew_Click()</code> if false don't execute <code>ButtonNew_Click()</code></p>

<p>Any ideas?</p>
