3

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?

3 Answers 3

4

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.

Sign up to request clarification or add additional context in comments.

Comments

1

Check this out. A really good Validation Framework for ASP.Net Webforms.

http://imar.spaanjaars.com/QuickDocId.aspx?quickdoc=477

alt text
(source: spaanjaars.com)

Comments

0

Also check out the Microsoft Enterprise Library Validation Application Block. Compared to DataAnnotations, it has a much larger feature set, visual studio integration, more possibilities to be extended and future versions will be able to read DataAnnotations attributes, but it also has a much steeper learning curve. Because of its complexity it isn't always a good fit for small projects.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.