Click here to Skip to main content
15,891,372 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all,

I need to do the client side validations for my empty asp.net MVC 3 app...

What i know till now is,

"We can write the validations in the form of functions in javascript file and then we can call this function and js file along with CSS in _Layout.cshtml file."

Now my question is while searching in google, i found as "Unobtrusive JavaScrip".

I am not getting clear idea regarding this.

Can any one tell me exactly what it mean and in which way we can use it....

Thanks in advance....
Posted
Comments
walterhevedeich 9-May-12 2:00am    
Well, most of the answers to the questions being asked here can be found on Google. It would be hard to get an answer if you are, indeed not getting a clear idea even by googling the said term. :)

1 solution

Unobtrusive JavaScript is a general approach to the use of JavaScript in web pages.
When you use unobtrusive validation, the validation rules are turned into HTML5 attributes. HTML5 attribute names can consist of only lowercase letters, numbers, and dashes.

have a look at :
http://nraykov.wordpress.com/2011/06/06/asp-net-mvc-3-unobtrusive-client-side-validation/[^]
http://bradwilson.typepad.com/blog/2010/10/mvc3-unobtrusive-validation.html[^]
 
Share this answer
 
v2
Comments
Sandeep Mewara 9-May-12 7:28am    
Comment by OP:
Hi ,

Thanks for reply....

I will check the links once...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900