Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Attribute based validation in ASP.NET Web Forms using MVC libraries?

Is there a way in ASP.NET Webforms to accommodate attribute based validation. If so any urls where this has been demonstrated. I am not looking for open source projects. Just as you can use MVC Routing in Web Forms, can the validation framework be used?

like image 420
chugh97 Avatar asked Sep 15 '26 13:09

chugh97


1 Answers

Routing is common for whole asp.net, therefore - you can easily use it in webforms too.


'Attribute based validation' is based on so called DataAnnotations. They aren't even asp.net specific, but common for whole .net. Mvc framework just uses them etc.

You might find this tutorial useful. I'm not sure i would use such an approach - but it's certainly possible.


Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!