protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { //查询所有用户 //allUser = UserInfoManage.GetAll(); string page = Request.QueryString["pageIndex"]; int totalCount; int pageIndex = string.IsNullOrEmpty(page) ? 1 : Convert.ToInt32(page); allUser = UserInfoManage.GetByPaging(pageIndex, pageSize, out totalCount); int totalPage = (int)Math.Ceiling((double)totalCount / pageSize); //总页数 pageBar = Utility.Paging.PageList(pageIndex, totalPage); } }