0
Hi Anil.
You are not allowed to insert items when you use bind function.
If you want to add items to dropdown liat dynamically... u can add rows to dropdown item source table...
It will automatically shows your nesly insrted item.
0
as per ur suggestion i change code but error is come
0
Hey,
This will be the order of binding dropdownlist
DropDownList2.DataTextField = "name";
DropDownList2.DataValueField = "rankcode";
DropDownList2.DataSource = dt;
DropDownList2.DataBind();
DropDownList2.Items.Insert(0, new ListItem("------Select Salemans---------", "0"));
Note: Datasource will be always after DataTextField and DataValueField