c# - How to add items to dynamically created select (html) Control -
hi how add items dynamically created select (html) control..
thanks
for adding items on server side, use htmlselect.items property. example,
var select = control htmlselect; // may not needed var items = select.items; // add items collection. items.add(new listitem("apples", "1")); items.add(new listitem("bananas", "2")); items.add(new listitem("cherries", "3"));
Comments
Post a Comment