protected void Page_Load(object sender, EventArgs e) { if (Session["LogIn"] == null) { Response.Redirect("LogInUI.aspx"); } if (!IsPostBack) { companyDropDownList.DataSource = stockInManager.CompanyDropDownList(); companyDropDownList.DataValueField = "Id"; companyDropDownList.DataTextField = "Name"; companyDropDownList.DataBind(); companyDropDownList.Items.Insert(0, new ListItem("--Select Company--", "0")); } }