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

Perl - how to grep a block of text from a file -

delphi - How to remove all the grips on a coolbar if I have several coolbands? -

javascript - Animating array of divs; only the final element is modified -