简体   繁体   English

带有ASP.NET MVC4应用程序的验证应用程序块

[英]Validation Application Block with ASP.NET MVC4 applications

I want to use the Enterprise Library Validation Application Block with my ASP.NET MVC4 application. 我想将企业库验证应用程序块与ASP.NET MVC4应用程序一起使用。 Which version of Enterprise Library is recommended? 建议使用哪个版本的企业库? Can anyone provide an example of XML Configuration file for VAB for ASP.NET MVC4? 谁能为ASP.NET MVC4提供VAB的XML配置文件示例?

I found an example to work with ASP.NET on the MSDN website: http://msdn.microsoft.com/en-us/library/ff664564(v=pandp.50).aspx Will it also work with MVC4 application? 我在MSDN网站上找到了一个使用ASP.NET的示例: http : //msdn.microsoft.com/en-us/library/ff664564 (v=pandp.50).aspx它也可以在MVC4应用程序中使用吗?

VAB Attributes are DataAnnotations so they can be used with with MVC. VAB属性是DataAnnotations,因此可以与MVC一起使用。 Or if you want to use VAB as a validation engine then you could create a ModelValidatorProvider for Enterprise Library. 或者,如果您想使用VAB作为验证引擎,则可以为企业库创建ModelValidatorProvider。 SOURCE : Entlib Official Site Discussion Forum 消息来源: Entlib官方站点讨论区

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM