Paging Event of GridView With Caching Object

Total Post:159

Points:1117
 1225  View(s)
Ratings:
Rate this:

I displaying the Gridview data form cache object.When i click on the pagenumber it shows blank webpage. how to handle the paging with caching object .

Do i need to check the same condition in paging event

 DataTable GetByCahe =(DataTable) Cache["DataStore"];
            if (GetByCahe != null)
            {
                ManageRegGrid.DataSource = GetByCahe;
                ManageRegGrid.DataBind();
            }
            else
            load From the database
  1. Post:378

    Points:2694
    Re: Paging Event of GridView With Caching Object

    Hi Samuel, 

    You do need same checking and rebinding if the cached data is not available.

Answer

Please check, If you want to make this post sponsored

You are not a Sponsored Member. Click Here to Subscribe the Membership.