J
Jeff
I'm trying to create a "paged" experience in ASP.NET, my query returns about
1000 records, not a ton, but they're url's to images and I just want to
display 9 on a page.
I am using a DataList control, which doesn't support paging, it's my
understanding that the DataGrid would actually request the whole query,
which is exactly what I don't want (I don't want 1000 records returned, just
9).
I've come up with a Stored Procedure that I pass the number of the first
record, and it just returns 9 rows. The problem is that Stored Procedure
isn't very dynamic, and I'm building my query based upon input from the
user. I have limited experience with Stored Procedures, but it would seem
that I have to create one for each of my varying possible queries (joining
different tables, that sort of thing). I think it's possible to use this
method, but it doesn't seem as efficient as what I did in regular ASP.
So, I was wondering if there was another way, something like a DataSet. I
am wondering if the .fill method would work, or if there's a way to start
from an absolute position. I was hoping to say something like starting from
the 400th record, read the next 9 into this DataSet. Then, I'd just bind
that DataSet to the DataList.
Any help would be great. Hopefully I've described the problem in a way that
everyone can understand and not just me.
1000 records, not a ton, but they're url's to images and I just want to
display 9 on a page.
I am using a DataList control, which doesn't support paging, it's my
understanding that the DataGrid would actually request the whole query,
which is exactly what I don't want (I don't want 1000 records returned, just
9).
I've come up with a Stored Procedure that I pass the number of the first
record, and it just returns 9 rows. The problem is that Stored Procedure
isn't very dynamic, and I'm building my query based upon input from the
user. I have limited experience with Stored Procedures, but it would seem
that I have to create one for each of my varying possible queries (joining
different tables, that sort of thing). I think it's possible to use this
method, but it doesn't seem as efficient as what I did in regular ASP.
So, I was wondering if there was another way, something like a DataSet. I
am wondering if the .fill method would work, or if there's a way to start
from an absolute position. I was hoping to say something like starting from
the 400th record, read the next 9 into this DataSet. Then, I'd just bind
that DataSet to the DataList.
Any help would be great. Hopefully I've described the problem in a way that
everyone can understand and not just me.