public void BindFacultyDropdown() { string command = "Select UserID, FirstName + ' ' + LastName as FacultyName from Users where role = 'Faculty'"; DataTable FacultyTable = new DataTable(); FacultyTable = DataService.GetDataWithoutParameter(command); FacultyList.DataValueField = "UserID"; FacultyList.DataTextField = "FacultyName"; FacultyList.DataSource = FacultyTable; FacultyList.DataBind(); FacultyList.Items.Insert(0, new ListItem("--- Select Faculty ---", "0")); }
/// <summary> /// Load Faculty to ListView /// </summary> protected void LoadFacultyList() { FacultyList.DataSource = _fm.GetFaculty(); FacultyList.DataBind(); }