Using DataAnnotations Validation in ASP.NET Web Formats

Is there a way to use the same DataAnnotations validation check that is commonly used in MVC in Webforms? It is preferable to include both client and server functionality.

+5
source share
3 answers

I haven’t tried it myself, but in this tutorial it says yes

+2
source

here is my validator implementation that you are asking for. This is a fully functional validator for data annotations with verification both on the client side and on the server side. And it supports the same extension scheme as in MVC.

+1
source

here is the answer that it works if you have the appropriate namespaces in the webforms application, see my answer here Data annotations in web forms at model level

0
source

All Articles