Click here to Skip to main content
15,170,971 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
how can i enter values in drop down list dynamically in asp.net
Posted

1 solution

Hi ,
C#
protected void Page_Load(object sender, EventArgs e)
{
   
    DropDownList1.Items.Insert(0, (new ListItem("test ", "1")));
    DropDownList1.Items.Insert(1, (new ListItem("test2 ", "1")));
}
   
v2

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