views:

51

answers:

1

I do long and slow query to get data to my GridView and I got lot of data, but when I'm changing page it loads as slow as at the start, it loads full data again and again, how to load data once and use paging without data loading ?

thank you

+1  A: 

Assuming you're using MS Sql Server here is a very good tutorial for paging through a large amount of data: http://www.asp.net/data-access/tutorials/efficiently-paging-through-large-amounts-of-data-vb

Tim Schmelter
Thank you but I can't separate my data to pages, because it will not solve the problem, I got very hard select method with lots of math.
nCdy
Anyway i don't understand why the RowNumber approach should be complexer than your original query.SELECT columnList, ROW_NUMBER() OVER(orderByClause) FROM TableName
Tim Schmelter