protected void Page_Load(object sender, EventArgs e) { string strPageNo = Request["PageNo"]; Int32.TryParse(strPageNo, out PageNo); if (PageNo == 0) { PageNo = 1; } if (!Page.IsPostBack) { BOLMultiMedias MultiMediasBOL = new BOLMultiMedias(); rptItems.DataSource = MultiMediasBOL.GetLatestByType(PageNo, PageSize, 4); rptItems.DataBind(); int ResultCount = MultiMediasBOL.GetLatestByTypeCount(4); int PageCount = (int)ResultCount / PageSize; if (ResultCount % PageSize > 0) { PageCount++; } ConcatUrl += ""; pgrToolbar.PageNo = PageNo; pgrToolbar.PageCount = PageCount; pgrToolbar.ConcatUrl = ConcatUrl; pgrToolbar.PageBind(); } }