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

c++ - Function signature as a function template parameter -

algorithm - What are some ways to combine a number of (potentially incompatible) sorted sub-sets of a total set into a (partial) ordering of the total set? -

How to call a javascript function after the page loads with a chrome extension? -