7
Shouts

Convention Based Localization With ASP.NET MVC - Davy Brion's Blog

published 427 days, 11 hours, 12 minutes ago posted by iftekharahmedamitiftekharahmedamit 430 days, 16 hours, 42 minutes ago
Friday, March 25, 2011 7:20:06 AM GMT Tuesday, March 22, 2011 1:49:45 AM GMT

A feature of ASP.NET MVC that i really like is that when you use the LabelFor extension method in a strongly-typed view, the LabelFor implementation will try to retrieve and use metadata for the property you're creating a label for. For instance: @Html.LabelFor(m => m.SomeProperty)

This will generate an HTML label for the SomeProperty property of your model. If you need localized views, you can annotate the property in your model like this: [Display(ResourceType = typeof(Resources), Name = "Res...

category: ASP.NET | clicked: 5 | | source: davybrion.com | show counter code
tags: ASP.NET MVC, Localization, MVC, ASP.NET