DropDownList number or text?

Komits

New Member
Our projects user a lot dropdownlist control. My question is what should we store in the database for them, the order number or text itself.For example:\[code\]<option value="http://stackoverflow.com/questions/12628959/1">This is the first option</option><option value="http://stackoverflow.com/questions/12628959/2">This is the second option</option>\[/code\]Convert the "1" and "2" to smallint 1, 2 to the database.--OR--\[code\]<option value="http://stackoverflow.com/questions/12628959/This is the first option">This is the first option</option><option value="http://stackoverflow.com/questions/12628959/This is the second option">This is the second option</option>\[/code\]use varchar data type in the field.order number is good for the statistics, but Text is dynamic for modification, for example insert another option between 1 and 2 and do not have to worry about the order. Also if it is embedded in the GridView, we can simply pull the text rather than put an DropDownList control in the GridView in order to see the text.
 
Back
Top