开发者

What new DataAnnotations are included in ASP.NET MVC2?

I'm reading about enhacement开发者_如何学Gos 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 ?


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜