html-beginform-using-onsubmit-to-validate
@using (Html.BeginForm("Save", "ReadingsEntry", FormMethod.Post,
new { enctype = "multipart/form-data", onsubmit = "validateForm(event)" }))
//add javascript function like
validateForm(event){//do your code}
<script>function validateForm(event){//do your code}</script>
No comments:
Post a Comment