ASP.NET MVC localization DisplayNameAttribute alternatives: a good way
- by Brian Schroer
The ASP.NET MVC HTML helper methods like .LabelFor and .EditorFor use model metadata to autogenerate labels for model properties. By default it uses the property name for the label text, but if that’s not appropriate, you can use a DisplayName attribute to specify the desired label text: [DisplayName("Remember me?")]
public bool…