protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { //ShowProducts(); AspNetPager1.PageSize = 3; AspNetPager1.RecordCount = GetRecordCount(); OnlineRep.DataSource = GetpageNews(AspNetPager1.StartRecordIndex, AspNetPager1.EndRecordIndex); OnlineRep.DataBind(); } }
protected void AspNetPager1_PageChanged(object sender, EventArgs e) { OnlineRep.DataSource = GetpageNews(AspNetPager1.StartRecordIndex, AspNetPager1.EndRecordIndex); OnlineRep.DataBind(); }