views:

31

answers:

1

Hi, I'm reading about enhacements in ASP.NET MVC 2, and as we see, there is a topic about "Support for DataAnnotations Attributes": RangeAttribute, RequiredAttribute, StringLengthAttribute, and RegexAttribute. Were they available in MVC v1 ?

+1  A: 

The DataAnnotations attributes lie in namespace System.ComponentModel.DataAnnotations. The ASP.NET MVC 2 includes built in support for the DataAnnotation validation. ASP.NET MVC 1 not support built in DataAnnotation support(for validation), it needs Data Annotations Model Binder as described here.

Adeel