Hi, I have a drop down list ddlServers and in my data access layer I run a
stored procedure to populate it. I need to be able to append items to the
drop down list and don't know how to do this. Here is the code I use to bind
the data retrieved from the DAL to the field.
{
DAL GetAllServers = new DAL();
DataSet dsServerNames = GetAllServers.GetAllServers();
ddlServers.DataSource = dsServerNames;
ddlServers.DataTextField = "Server_Name";
ddlServers.DataValueField = "Server_Id";
ddlServers.DataBind();
ddlServers.Items.Insert(0,new ListItem("--Select a Server--",""));
Console.WriteLine();
}