You want to call onSubmit() during the submit function of the form (which should only fire when the form is about to be submitted) and not on the click event for the button (which fires every time).
So instead of $("#submit").click use $("form").submit or similar.
RogerH
Member
354 Points
73 Posts
Re: Html.ValidationSummary Question
Apr 26, 2012 08:58 PM|LINK
You want to call onSubmit() during the submit function of the form (which should only fire when the form is about to be submitted) and not on the click event for the button (which fires every time).
So instead of $("#submit").click use $("form").submit or similar.