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?
Download ASP.NET MVC 2 Futures from CodePlex.
Save its files somewhere in the file system:
C:\Program Files\Microsoft ASP.NET\ASP.NET MVC 2 Futures\
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:
protected void Application_Start()
{
...
ModelMetadataProviders.Current = new DataAnnotations4ModelMetadataProvider();
DataAnnotations4ModelValidatorProvider.RegisterProvider();
}