protected void BingUserMess() { UserMess um = new UserMess(); DataListUserMess.DataSource = um.GetUserMess(); DataListUserMess.DataKeyField = "Id"; DataListUserMess.DataBind(); }
//分页 protected PagedDataSource PsPageData() { UserMess dll = new UserMess(); PagedDataSource ps = new PagedDataSource(); ps.DataSource = dll.GetUserMess(); ps.AllowPaging = true; ps.PageSize = 10; string txtPa = Request.QueryString["page"]; string txtCurrent = string.Empty; if (txtPa != null) { ps.CurrentPageIndex = Convert.ToInt32(txtPa) - 1; } else { ps.CurrentPageIndex = 0; } RepeaterCategory.DataSource = ps; RepeaterCategory.DataBind(); return(ps); }