views:

21

answers:

2

Hi i want to add the particular field in dropdownlist by coding so hows that's possible

+1  A: 

not sure from your question, but I think you are looking for...

ListItem li = new ListItem();
    li.Text = "yourtext";
    li.Value = "yourvalue";
    li.Selected = true;
    yourDropdown.Items.Add(li);
Muhammad Akhtar
A: 

if you mean a new item in drop-down list then use this:

ddList.Items.Add("Your New Item");

if you are using databinding with datatable having following fields:

Name, Age, ID 

then use this

dataTable.Rows.InsertAt(0,new object[]{"[Select]",0,-1});
TheVillageIdiot