Sajid Hussain

Sajid Hussain

  • 1.2k
  • 514
  • 100.7k

how does fillup dropdown on page load

Mar 25 2015 5:59 AM
i want following event fire on page load.
protected void ddlSelectSector_SelectedIndexChanged(object sender, EventArgs e)   
{ int sectorId = SafeConvert.ToInt32(ddlSelectSector.SelectedValue);
var empList = _service.GetEmployeeDutyByToSector_Id(sectorId).Where(x => x.EndDate <= DateTime.Today && x.ToSector_Id == sectorId).ToList();
ddlRollNo.Bind(empList, "EmployeeIdName", "Employee_Id");
}

Answers (2)