Hello.
I'm trying to bind the following enum
public enum CertificateTypes : byte
{
None = 0,
Original = 1,
AuthenticatedCopy = 2,
Numbered = 3
}
to a tinyint
column on the database. However, when creating the SelectListItems and calling, for instance, Person.CertificateTypes.Original.ToString() I get this:
<option value="Original">Original</option>
which is not bindable to a byte? column. How should I do this? Should I explicitly set the value to "1" on the Value
property of the SelectListItem
? Or is there a way to make this work "automagically"?