ObjectDataSource, SqlDataSource, DataSet
I am working on a solution that needs to perform a search (search
criteria can be as little as 1 and as high as 20 fields) through an
average of 25,000 records and return results in a GridView. I only want
to return 150 results total, and page through them 10 results at a time
- but I also need to grab a count from the MSSQL server as to how many
TOTAL records were found. So maybe 4,500 records were found that met
the users' search criteria, but I only want to show the first 150, but
let the user know there were 4,500.
The GridView will need to page through these records, 10 at a time.
>From what I understand with this scenario and the DataSet, is that each
time the user clicks to go to a different page, the MSSQL server will
be re-queried and the DataSet re-filled each time, even though I'm only
retrieving 10 records for display. Caching 25,000+ records is not an
option due to the strain that this memory would take on the web server.
I've looked at the ObjectDataSource and custom pagination, but how do I
pass all the search parameters into this ObjectDataSource? Is the
ObjectDataSource even the most efficient way to do this? Since I have
to refer to a file in the App_Code folder with this method, I am
confused as to how I write the code in the .CS page in the App_Code
folder. Is there any type of comprehensive resource out there that
explains how to write custom classes and how to pass parameters into
Any help anyone can give would be greatly appreciated. Thanks for your
|All times are GMT. The time now is 07:04 AM.|
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.