protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { DropDownListDept.DataSource = DAL.GetDepartments(); DropDownListDept.DataBind(); DropDownListManager.DataSource = DAL.GetEmployeeIdAndName(); DropDownListManager.DataBind(); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { DropDownDepartment.DataSource = DAL.GetDepartments(); DropDownDepartment.DataBind(); DropDownListManager.DataSource = DAL.GetEmployeeIdAndName(); DropDownListManager.DataBind(); DropDownListManager.Items.Add(new ListItem("--Select--", "0")); DropDownListManager.SelectedValue = "0"; } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { DropDownListDept.DataSource = DAL.GetDepartments(); DropDownListDept.DataBind(); DropDownListManager.DataSource = DAL.GetEmployeeIdAndName(); DropDownListManager.DataBind(); RangeValidator2.MaximumValue = DateTime.Now.ToShortDateString(); RangeValidator2.MinimumValue = DateTime.Now.AddYears(-100).ToShortDateString(); } }