I have a button:
<asp:Button
runat="server"
ID="btNew"
OnClick="ButtonNew_Click"
Text="New" />
I have the OnClick method:
protected void ButtonNew_Click(object sender, EventArgs e)
{
}
On the same page (.aspx), I have a JavaScript function:
function MyCheck()
{
// Return true or false
}
I'd like when I click on the button to execute the JavaScript function (MyCheck()). If true, execute ButtonNew_Click(). If false, don't execute ButtonNew_Click().
Any ideas?