Reputation: 1749
I am currently looking a valiadation controls in javascript and ASP.NET and have come across the new MVC "jquery.validate.unobtrusive.js" which appears to use the data tags in the HTML to do the validation, is it possible to use these in standard ASP.NET (none MVC) as my logic seems to indication you can (by adding the appropriate data tags) but I can't find any referrance to using the library outside MVC
Any does anybody know where i can get the libraries !!!
Upvotes: 2
Views: 703
Reputation: 1749
Thanks people ... after a little looking about, it appears that the MVV unobtrusive controls, just dont place javascript in the page, but data- attributed to all the controls (and a second control) and then run through witha bit of jQuery, it isnt really what I was looking for, neight does it makes the page any smaller ... thanks for your answers
Upvotes: 0
Reputation: 3240
You won't be able to use the data annotations to govern your validation, but you can use jQuery Validation (which is what MVC3 is using under the covers) for client validation in a web forms app. David Ward has a few good blog posts here http://encosia.com/2009/11/04/using-jquery-validation-with-asp-net-webforms/.
Upvotes: 5