private void InitData() { string strWhere = " 1=1 "; HttpCookie cookie = Request.Cookies["qx"]; if (cookie != null) { qx = cookie.Values["qxid"].ToString(); } if (qx == "4") { string username = HttpUtility.UrlDecode(cookie.Values["user"].ToString(), Encoding.UTF8); strWhere = "username='******'"; } if (qx == "3") { Response.Redirect("Error.aspx"); } int PageIndex = 1; if (Request.QueryString["page"] != null) { int.TryParse(Request.QueryString["page"].ToString(), out PageIndex); } int PageSize = 10; int TotalCount = 0; DataTable dt = H_StudentClass.GetList(PageSize, PageIndex, strWhere, out TotalCount); this.Repeater1.DataSource = dt; this.Repeater1.DataBind(); this.LiteralPage.Text = PageClass.BuildPage(PageIndex, TotalCount, PageSize); }