Click here to Skip to main content
15,913,941 members
Please Sign up or sign in to vote.
3.00/5 (1 vote)
See more:
how to create dropdown list in dynami
Posted
Comments
Sandeep Mewara 25-Sep-10 5:58am    
Not clear. Update question with what you are trying to do.

If you want to create a dropdownlist in run time then take div tag,
then create a dropdownlist & add it in run time.

using System.Web.UI.WebControls;


DropDownList ddlNew = new DropDownList();
ddlNew.Items.Clear();
ddlNew.Items.Add(new ListItem("1","1"));
div1.Controls.Add(ddlNew);
 
Share this answer
 
Use

dropdownlist.Items.Add
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900