I'm using a LinqDataSource
to populate a basic GridView
in ASP.NET. The user has the ability to filter the results, so I use a few WhereParameters
and the Where
within the LinqDataSource
.
My client has requested an option to export the filtered results to a file. Easy enough to pipe the data into a file, but I would prefer not to rewrite all the where clauses in the codebehind. I would simply like to extract the full set of results, preferably by using the already configure LinqDataSource
.
When using LinqDataSource
's OnSelect
method, the e.Result
has the data I'm after, but my GridView
PageSize
is set to 20, which means that the LinqDataSource
(rightly so) only fetches the first 20 records.
Is there anyway to get hold of the entire data set?