You need to know the total number of records and the number of records displayed on the page.
This useful post shows how to get a record counter:
private LinqDataSourceSelectEventArgs args;
protected void LinqDataSource1_Selecting(object sender, LinqDataSourceSelectEventArgs e)
{
args = e;
e.Result = new Database().Table.Whatever...
}
protected void LinqDataSource1_Selected(object sender, LinqDataSourceStatusEventArgs e)
{
this.label1.Text = args.Arguments.TotalRowCount + " records";
}
The following discusses a situation that is similar to yours.
source
share