Пример #1
0
 //refreshes data list
 protected void PopulateDataList()
 {
     pg = new PagedDataSource();
     ds = AudioFiles.Search(searchstring.Replace("'", ""));
     if (ds.Tables[0].Rows.Count > 0)
     {
         pg.AllowPaging      = true;
         pg.DataSource       = ds.Tables[0].DefaultView;
         pg.PageSize         = 5;
         pg.CurrentPageIndex = this.currentpage;
         this.ImageButtonNextPage.Enabled = !pg.IsLastPage;
         this.ImageButtonPrevPage.Enabled = !pg.IsFirstPage;
         DataList1.DataSource             = pg;
         DataList1.DataBind();
     }
 }