how to add items to drop down list box at runtime

how to add items to drop down list at runtime
kranthi4uonlyAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
riyazthadConnect With a Mentor Commented:
you can add like this. But Bob already mentioned that but you may be confused with DropDown name he used.
comboBox1.Items.Add("Test");
0
 
Bob LearnedCommented:
ASP.NET:
    DropDownList1.Items.Add(new ListItem("text", "value"));

WinForms:
   DropDownList1.Items.Add("text");

Bob
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
kranthi4uonlyAuthor Commented:
sorry i mean to a  combo box can we enter values in combo box at runtime
0
 
Salim FayadCommented:
Do you mean "writing" at runtime?
0
 
kranthi4uonlyAuthor Commented:
yes
0
All Courses

From novice to tech pro — start learning today.