7
shouts

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

published 334 days, 21 hours, 22 minutes ago posted by iftekharahmedamitiftekharahmedamit 338 days, 2 hours, 52 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, ASP.NET MVC, Localization, MVC