Hi i want to add the particular 开发者_如何学编程field in dropdownlist by coding so hows that's possible
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);
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});
精彩评论