Administrator Admin
Number of posts : 160 Age : 38 Location : Lucknow Job/hobbies : Software Engeener What U like To do ? : Because Its Rock with me. Registration date : 2008-01-06
| Subject: How to Add DropDownList during Runtime in C# or Dropdown in code behind 4/29/2009, 10:00 am | |
| This is the code for Drop downlist when you have to add different data in dropdown during runtime. where “Carbon” is the text value and “1″ is the Value Code: | public void Button1_Click (object sender, System.EventArgs e) { this.ListBox1.Items.Add(new ListItem("Carbon", "1")); this.ListBox1.Items.Add(new ListItem("Oxygen", "2")); }
|
| |
|