Geeks With Blogs
Scott Wojan DotRant BLOG March 2013 Entries
ASP.NET MVC Helper Method for Enums... supports override of text using System.ComponentModel.DescriptionAttribute
public static MvcHtmlString DropDownListFromEnumFor<... TProperty>(this HtmlHelper<TModel> helper, Expression<Func<TModel, TProperty>> expression, object htmlAttribute = null) { var type = typeof (TProperty); var addBlank = false; if (type.IsGenericType && type.GetGenericTypeDefiniti... == typeof(Nullable<>)) { type = type.GetGenericArguments()[0]; addBlank = true; } var values = (from f in type.GetFields(System.Refle... | System.Reflection.BindingFl... ......

Posted On Wednesday, March 13, 2013 5:07 PM

Copyright © Scott Wojan | Powered by: GeeksWithBlogs.net