how-to enable Client-Side validation for a ordinary textbox in ASP.NET MVC.
A:
Scott Guthrie just published a good article on validating models -- and you should think about it as model validation, not textbox validation -- in ASP.NET MVC 2.0. You might want to check out how they do validation in the NerdDinner example at http://nerddinner.codeplex.com/.
tvanfosson
2010-01-18 23:03:28
A:
There are various options. If you are using MVC 1 you might want to read this article http://blog.codeville.net/2008/04/30/model-based-client-side-validation-for-aspnet-mvc/. If you are using MVC 2, using DataAnnotations, which has the option of validating on client side.
iaimtomisbehave
2010-01-18 23:08:16