Reputation: 4661
Is there a way to use the same DataAnnotations validation commonly used in MVC in Webforms? Preferably including both Client-side and server-side functionality.
Upvotes: 5
Views: 5027
Reputation: 2719
here is the answer it works if you have the proper namespaces in the webforms app, see my answer here Data Annotations in webforms at Model level
Upvotes: 0
Reputation: 3203
here is my implementation of a validator you are asking for. It is fully functional data annotations validator, with both client- and server-side validation. And it supports the same extensibility schema as in MVC.
Upvotes: 1