protected void Page_Load(object sender, EventArgs e) { if (HttpContext.Current.Session["EmpID"] == null) { Response.Redirect("/Account/Login.aspx"); } else { if (!this.IsPostBack) { int EmpID = (int)HttpContext.Current.Session["EmpID"]; int DeptID = (int)HttpContext.Current.Session["DeptID"]; SelectStaffDropDownList.DataSource = SupplierBizLogic.FindEmpByDepID2(DeptID, EmpID); SelectStaffDropDownList.DataTextField = "Name"; SelectStaffDropDownList.DataValueField = "EmployeeID"; SelectStaffDropDownList.DataBind(); } } }