I’ve added code the the OnClientClick property of an asp.net button and now the validation controls are not working. When I remove the OnClientClick code the validation works.
How can I get both of them to work?
<asp:Button
ID="btnNext"
runat="server"
Text="Save & Continue"
SkinID="btnContinue"
OnClick="btnNext_Click"
OnClientClick="_changesMade=false; return true;"
ValidationGroup="vgPreMedSchool" Width="176px" />
Try this.
Page_ClientValidate() is a javascript function that asp.net uses to invoke the page validation.