Html.DescriptionFor<T>
- by Stacey
I'm trying to emulate the Html Helper for "LabelFor" to work with the [Description] Attribute. I'm having a lot of trouble figuring out how to get the property from the helper though. This is the current signature...
class Something
{
[Description("Simple Description")]
[DisplayName("This is a Display Name, not a Description!")]
public string Name { get; set; }
}
public static MvcHtmlString DescriptionFor<TModel, TValue>(this HtmlHelper<TModel> html, Expression<Func<TModel, TValue>> expression);