protected void Page_Load(object sender, EventArgs e) { user = Session["CurrentUser"] as User; mbh = new MeassageBoradHelper(); if (!IsPostBack) { this.MBcategories.Items.Clear(); this.MBcategories.DataSource = MeassageBoradHelper.GetCategories(); this.MBcategories.DataTextField = "CategoriesTitle"; this.MBcategories.DataValueField = "CategoriesId"; this.MBcategories.DataBind(); } GetPageIndex(); this.pagingAllPage.InnerHtml = "一共有" + mbh.paging.AllPage.ToString() + "页数据"; divMassageBorad.InnerHtml = mbh.GetTopPage(); ulMBCategories.InnerHtml = MeassageBoradHelper.GetMessageBoradCategories(); if (user != null) { if (user.name.Length > 0) { this.userName.InnerHtml = user.name; } } }
protected void pagingFistPage_ServerClick(object sender, EventArgs e) { divMassageBorad.InnerHtml = mbh.GetTopPage(); GetPageIndex(); }