protected void lstDept_SelectedIndexChanged(object sender, EventArgs e) { string strDept = ""; BLL_Infra_UserCredentials objInfra = new BLL_Infra_UserCredentials(); if (lstDept.Items[0].Selected == true) { int UserCompanyID = int.Parse(Session["USERCOMPANYID"].ToString()); DataTable dtUsers = objInfra.Get_UserList(UserCompanyID); lstUser.DataSource = dtUsers; lstUser.DataBind(); lstUser.Items.Insert(0, new ListItem("- ALL -", "0")); } else { foreach (ListItem li in lstDept.Items) { if (li.Selected == true) { if (strDept.Length > 0) { strDept += ","; } strDept += li.Value; } } if (strDept.Length > 0) { int UserCompanyID = int.Parse(Session["USERCOMPANYID"].ToString()); DataTable dtUsers = objInfra.Get_UserList_By_Dept_DL(UserCompanyID, strDept); lstUser.DataSource = dtUsers; lstUser.DataBind(); lstUser.Items.Insert(0, new ListItem("- ALL -", "0")); } } BindPublishDoc(); }