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

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -