protected void Page_Load(object sender, EventArgs e) { productCatalogue = ProductCatalogue.GetCatalogues() .FirstOrDefault(x => x.Id == Request.QueryString["Id"]); if (productCatalogue == null) { return; } ProductCatalogueNameLabel.InnerText = productCatalogue.Name; if (!IsPostBack) { CatalogueEntriesListView.DataSource = productCatalogue.CatalogueEntries; CatalogueEntriesListView.DataBind(); } }
protected void CatalogueEntriesListView_OnPagePropertiesChanging(object sender, PagePropertiesChangingEventArgs e) { EntriesDataPager.SetPageProperties(e.StartRowIndex, e.MaximumRows, false); CatalogueEntriesListView.DataSource = productCatalogue.CatalogueEntries; CatalogueEntriesListView.DataBind(); }