ENUM DropdownList as a Custom Property in WebPart
how would i do if i have to show the value in the dropdownlist something like this:
UTF-8, ISO-8859-1 below prop works fine if there is no space or no hypen and i know there is one option to use underscore but does not seems look nice, so i am looking to displa开发者_C百科y the value in dropdownlist UTF-8, ISO-8859-1
public enum ddlEnum { option1, option2, option3 }
[WebBrowsable(true),
Category("Miscellaneous"),
Personalizable(PersonalizationScope.Shared),
WebDisplayName("Dropdown List Display Text")]
public ddlEnum ddlProp { get; set; }
I don't think its possible since enum values have the same definition rules as other C# identifiers.
精彩评论