asp.net - form verification before submitting -


i have following form

<form id="myform" action="/problems/post"  method="post" enctype="multipart/form-data">  <input type="text" id="problemsubject" name="problemsubject" /> <input type="file" id="uploadfile" name="uploadfile"/> <textarea rows="" cols="" class="form-textarea" id="problemdescription" name="problemdescription"></textarea> </form> 

i have submit form controller method(which have done), should first validated i.e. should not contain empty fields. want "a message should appear telling field blank". how can done. please me. thanks.

take @ of samples. (http://www.asp.net/mvc/tutorials/older-versions/javascript/creating-a-mvc-3-application-with-razor-and-unobtrusive-javascript)

essentially can validate on client side , on server side, should both.

it easy validation in asp.net mvc3. @ tutorials above.

or one: http://www.codeproject.com/articles/249452/asp-net-mvc3-validation-basic


Comments

Popular posts from this blog

objective c - Can't build GCM with Protobuf in Xcode -

ember.js - EmberJS Model find not up-to-date with underlying store -

javascript - jQuery iScroll clickable list elements while retaining scroll? -