I Have list "Department" and takes the data from it. I want the first value in DropDownMenu to be "Not a dept"...
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
using (SPSite site = new SPSite("http://sf-spsdev04/sites/gkk92sitecolection/"))
{
using (SPWeb web = site.OpenWeb())
{
SPList list = web.Lists["Departments"];
dropDep.DataSource = list.Items;
dropDep.DataValueField = "Title";
dropDep.DataTextField = "Title";
dropDep.DataBind();
}
}
}
}