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
  • 30,834
  • 6
  • 70
  • 106
Vara Prasad.M
  • 1,530
  • 9
  • 31
  • 55

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,908
  • 70
  • 97
  • 130
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
  • 30,834
  • 6
  • 70
  • 106