如何安装 ASP.NET MVC 2 Futures?
我想使用 DataAnnotations.DisplayAttribute.Order 属性在使用 DisplayForModel 和 EditorForModel 方法。
相关问题:
是否 DataAnnotations.DisplayAttribute.Order 属性不适用于 ASP.NET MVC 2?
我认为我需要使用ASP.NET MVC 2 Futures。但我无法让它发挥作用。
如何安装 ASP.NET MVC 2 Futures?
为什么我的字段仍然乱序?
I want to use the DataAnnotations.DisplayAttribute.Order property to arrange my fields when using the DisplayForModel and EditorForModel methods.
Related question:
Does the
DataAnnotations.DisplayAttribute.Order
property not work with ASP.NET MVC
2?
I think that I need to use the ASP.NET MVC 2 Futures. But I can't get it to work.
How do I install ASP.NET MVC 2 Futures?
Why are my fields still out of order?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
从 CodePlex 下载 ASP.NET MVC 2 Futures。
将其文件保存在文件系统中的某个位置:
<块引用>
C:\Program Files\Microsoft
ASP.NET\ASP.NET MVC 2 期货\
在项目中,右键单击引用,然后选择添加引用
浏览并选择文件Microsoft.Web.Mvc.AspNet4.dll
在Global.asax.cs中注册模型元数据提供程序:
Download ASP.NET MVC 2 Futures from CodePlex.
Save its files somewhere in the file system:
In the project, right-click References and choose Add Reference
Browse to and then select file Microsoft.Web.Mvc.AspNet4.dll
Register the model metadata provider in Global.asax.cs:
您应该只需要下载 futures DLL (Microsoft.Web.Mvc.dll),在 Visual Studio 中添加对它的引用,并引用命名空间
Microsoft.Web.Mvc
数据注释只是属性,因此,如果出现问题,您可能看不到编译器错误。该属性将不起作用。您应该获取 futures 的源代码并将其包含在您的项目中,以便您可以在适当的属性服务代码上断点并确保它正在触发。
You should just need to download the futures DLL (Microsoft.Web.Mvc.dll), add a reference to it in Visual Studio, and reference the namespace
Microsoft.Web.Mvc
Data Annotations are just attributes, so you may not see compiler errors if there is a problem. The attribute will just not work. You should obtain the source for futures and include it in your project, so that you can breakpoint the appropriate attribute servicing code and make sure it is firing.
您可能需要在 global.asax 中注册元数据提供程序。
另外,Microsoft.Web.Mvc.AspNet4.dll 是程序集。您可以从这里获取它 http://aspnet.codeplex.com/releases/view/41742< /a>
You probably need to register the metadata provider in your global.asax.
And also, Microsoft.Web.Mvc.AspNet4.dll is the assembly. You can get it from here http://aspnet.codeplex.com/releases/view/41742