In my website there is a List
ResGrid.DataBind();
line and it says that CurrentPageIndex should be >=0 and less than PageCount.
Can anyone help me? This is the code i'm talking about
.aspx file
ID="ResGrid"
AllowPaging="true"
cellpadding=5
gridlines="Vertical"
onPageIndexChanged="setPage"
PageSize="15">
Mode="NumericPages"
horizontalalign="right" />
aspx.cs file
List
protected void bindGrid()
{
ResGrid.DataSource = Results_final;
ResGrid.DataBind();
lblTracker.Text = "Page " + (ResGrid.CurrentPageIndex + 1) + " of " + ResGrid.PageCount;
}
{
ResGrid.CurrentPageIndex = e.NewPageIndex;
bindGrid();
}
kikiPosted Feb 2, 2008, 10:51 AM