2

I want to add the below values from Enum to drop down list

<option value="0">-- Select --</option>
<option value="AC">Active</option>
<option value="IN">InActive</option>
<option value="PC">Pending Closure</option>

thanks, Vara Prasad.M

Jonas Elfström
  • 29,906
  • 6
  • 69
  • 104
Vara Prasad.M
  • 1,520
  • 8
  • 28
  • 53

2 Answers2

1

Yes its possible. Check the Question: How do you bind an Enum to a DropDownList control in ASP.NET?

Community
  • 1
  • 1
CloudyMarble
  • 36,156
  • 70
  • 93
  • 127
0

No, you don't because you can't. An enum must be of an integral type and a name of a keyword can't be 0 or have a space in it's name so it's impossible to convert them to a string to reach your goal. Converting the keyword to a string is also not something I recommend.

Jonas Elfström
  • 29,906
  • 6
  • 69
  • 104