How do I populate a dropdownlist with enum values?
I’m using a helper that i found here to populate my SelectLists with a generic enum type, i did a little modification to add the selected value though, here’s how it looks like : public static SelectList ToSelectList<T>(this T enumeration, string selected) { var source = Enum.GetValues(typeof(T)); var items = new Dictionary<object, string>(); var displayAttributeType … Read more