I have an asp.net c # web application. In it I have a gridview. Gridview retrieves search results from a database. Sometimes there are many results, so I wanted to use paging. Here is what I tried:
protected void grdResults_PageIndexChanging(object sender, GridViewPageEventArgs e)
{
grdResults.PageIndex = e.NewPageIndex;
grdResults.DataBind();
}
For some reason, when I click on the page number, it shows me an EmptyDataText (there are no entries to display). What code will work? Please help.
thanks
source
share