DropDownList d2 = (DropDownList)gvrow.Cells[2].FindControl("ddlfabric"); d2.Items.Insert(0, new ListItem("Select")); if (txtfabric.Text != "") { if(!d2.Items.Contains(new ListItem(txtfabric.Text))) { d2.Items.Insert(1, txtfabric.Text); } }
if (!Page.IsPostBack) { //Add your "Select" Item here. }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)