protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { string mId = Request.QueryString["id"].ToString(); string[] id = mId.ToString().Split(new char[] { '@' }); string menuId = ""; for (int i = 0; i < id[1].Length; i++) { string s = id[1].Substring(i + 1, 1); if (s != "-") { menuId += s; } else { break; } } AccessControl1.MenuId = menuId; AccessControl1.UserId = Session[sessionNames.userID_Karbar].ToString(); DataTable dtExamPlace = new DataTable(); dtExamPlace = ExamBusiness.GetCityNameFilterByExaminerExamPlace(); ddl_city.DataSource = dtExamPlace; ddl_city.DataTextField = "Name_City"; ddl_city.DataValueField = "ID"; ddl_city.DataBind(); ddl_city.Items.Insert(0, new ListItem("انتخاب کنید")); //ddl_city.Items.Add(new ListItem("انتخاب کنید", "0")); //ddl_city.Items[ddl_city.Items.Count - 1].Selected = true; ddl_user.DataSource = ExamBusiness.GetExaminerUser(); ddl_user.DataTextField = "UserName"; ddl_user.DataValueField = "UserId"; ddl_user.DataBind(); ddl_user.Items.Insert(0, new ListItem("انتخاب کنید")); //ddl_user.Items.Add(new ListItem("انتخاب کنید", "0")); //ddl_user.Items[ddl_user.Items.Count - 1].Selected = true; grd_Examiner.DataSource = ExamBusiness.GetExaminer(); grd_Examiner.DataBind(); } }