Paging and cache

When a GridView gets information back from the server and it is doing paging 
(or anytime I suppose).

Where is it putting the data while it renders the data.

If I do a DataBind or use an SQLDataSource and the data comes back (say 
10,000 rows) and you are having the GridView handle the paging.  Where does 
it put the data in the interim?

Does it cache it on the Client side somewhere?

Thanks,

Tom 


0
tshad
3/31/2010 11:32:16 PM
dotnet.framework.aspnet 1425 articles. 0 followers. Follow

6 Replies
738 Views

Similar Articles

[PageSpeed] 23

tshad wrote:
> When a GridView gets information back from the server and it is doing paging 
> (or anytime I suppose).
> 
> Where is it putting the data while it renders the data.
> 
> If I do a DataBind or use an SQLDataSource and the data comes back (say 
> 10,000 rows) and you are having the GridView handle the paging.  Where does 
> it put the data in the interim?
> 
> Does it cache it on the Client side somewhere?
> 

It goes back to the database each time you page I suspect when using a 
datasource.
0
Mr
3/31/2010 11:55:47 PM
"Mr. Arnold" <Arnold@Arnold.com> wrote in message 
news:eMDMy2S0KHA.4548@TK2MSFTNGP06.phx.gbl...
> tshad wrote:
>> When a GridView gets information back from the server and it is doing 
>> paging (or anytime I suppose).
>>
>> Where is it putting the data while it renders the data.
>>
>> If I do a DataBind or use an SQLDataSource and the data comes back (say 
>> 10,000 rows) and you are having the GridView handle the paging.  Where 
>> does it put the data in the interim?
>>
>> Does it cache it on the Client side somewhere?
>>
>
> It goes back to the database each time you page I suspect when using a 
> datasource.

Right.

But when you do a DataBind - The database would send you back all the data 
you request at once (unless you are using a Reader) and it would have to be 
stored in some structure while the object is working with it (extracting a 
page for instance) or before the rendering of the page.

I am just curious as to where asp puts it - in some dataset somewhere?

For example, I could do an stored procedure call from a GridView.DataBind() 
and 10,000 rows could come back but I only want page 5.  The GridView would 
have to store the 10,000 rows somewhere and determine which rows to put on 
the page.  Could be in a DataSet somewhere and when the page is rendered it 
would go through the dataset to get the data it needs.

Where would the DataSet be?  Since the DataBind() would be done on the 
server, where would the Server put it before it rendered the page.

Thanks,

Tom 


0
tshad
4/1/2010 12:15:48 AM
tshad wrote:
> "Mr. Arnold" <Arnold@Arnold.com> wrote in message 
> news:eMDMy2S0KHA.4548@TK2MSFTNGP06.phx.gbl...
>> tshad wrote:
>>> When a GridView gets information back from the server and it is doing 
>>> paging (or anytime I suppose).
>>>
>>> Where is it putting the data while it renders the data.
>>>
>>> If I do a DataBind or use an SQLDataSource and the data comes back (say 
>>> 10,000 rows) and you are having the GridView handle the paging.  Where 
>>> does it put the data in the interim?
>>>
>>> Does it cache it on the Client side somewhere?
>>>
>> It goes back to the database each time you page I suspect when using a 
>> datasource.
> 
> Right.
> 
> But when you do a DataBind - The database would send you back all the data 
> you request at once (unless you are using a Reader) and it would have to be 
> stored in some structure while the object is working with it (extracting a 
> page for instance) or before the rendering of the page.
> 
> I am just curious as to where asp puts it - in some dataset somewhere?
> 
> For example, I could do an stored procedure call from a GridView.DataBind() 
> and 10,000 rows could come back but I only want page 5.  The GridView would 
> have to store the 10,000 rows somewhere and determine which rows to put on 
> the page.  Could be in a DataSet somewhere and when the page is rendered it 
> would go through the dataset to get the data it needs.
> 
> Where would the DataSet be?  Since the DataBind() would be done on the 
> server, where would the Server put it before it rendered the page.
> 

It goes back each time one pages and reads those 10,000 records every 
time. As far as what page to page too and how many lines per page, that 
has already been predetermined.

That dataset is only good for the life of the page, and if one wanted to 
save the dataset and bind to the dataset and not go back to the 
database, then on puts the dataset in a session variable and save it, 
binding the dataset held in session to the control.
0
Mr
4/1/2010 2:01:23 AM
"Mr. Arnold" <Arnold@Arnold.com> wrote in message 
news:uoRNA9T0KHA.4548@TK2MSFTNGP06.phx.gbl...
> tshad wrote:
>> "Mr. Arnold" <Arnold@Arnold.com> wrote in message 
>> news:eMDMy2S0KHA.4548@TK2MSFTNGP06.phx.gbl...
>>> tshad wrote:
>>>> When a GridView gets information back from the server and it is doing 
>>>> paging (or anytime I suppose).
>>>>
>>>> Where is it putting the data while it renders the data.
>>>>
>>>> If I do a DataBind or use an SQLDataSource and the data comes back (say 
>>>> 10,000 rows) and you are having the GridView handle the paging.  Where 
>>>> does it put the data in the interim?
>>>>
>>>> Does it cache it on the Client side somewhere?
>>>>
>>> It goes back to the database each time you page I suspect when using a 
>>> datasource.
>>
>> Right.
>>
>> But when you do a DataBind - The database would send you back all the 
>> data you request at once (unless you are using a Reader) and it would 
>> have to be stored in some structure while the object is working with it 
>> (extracting a page for instance) or before the rendering of the page.
>>
>> I am just curious as to where asp puts it - in some dataset somewhere?
>>
>> For example, I could do an stored procedure call from a 
>> GridView.DataBind() and 10,000 rows could come back but I only want page 
>> 5.  The GridView would have to store the 10,000 rows somewhere and 
>> determine which rows to put on the page.  Could be in a DataSet somewhere 
>> and when the page is rendered it would go through the dataset to get the 
>> data it needs.
>>
>> Where would the DataSet be?  Since the DataBind() would be done on the 
>> server, where would the Server put it before it rendered the page.
>>
>
> It goes back each time one pages and reads those 10,000 records every 
> time. As far as what page to page too and how many lines per page, that 
> has already been predetermined.
>
> That dataset is only good for the life of the page, and if one wanted to 
> save the dataset and bind to the dataset and not go back to the database, 
> then on puts the dataset in a session variable and save it, binding the 
> dataset held in session to the control.

I understand that.

I think you misunderstand what I am asking.  This question came up at work 
today.

I am trying to figure out where the data is stored while it is rendering the 
page.  The data has to be somewhere after the result set is returned until 
the data is rendered to the screen.

Where is it?

Thanks,

Tom 


0
tshad
4/1/2010 2:09:33 AM
tshad wrote:
> "Mr. Arnold" <Arnold@Arnold.com> wrote in message 
> news:uoRNA9T0KHA.4548@TK2MSFTNGP06.phx.gbl...
>> tshad wrote:
>>> "Mr. Arnold" <Arnold@Arnold.com> wrote in message 
>>> news:eMDMy2S0KHA.4548@TK2MSFTNGP06.phx.gbl...
>>>> tshad wrote:
>>>>> When a GridView gets information back from the server and it is doing 
>>>>> paging (or anytime I suppose).
>>>>>
>>>>> Where is it putting the data while it renders the data.
>>>>>
>>>>> If I do a DataBind or use an SQLDataSource and the data comes back (say 
>>>>> 10,000 rows) and you are having the GridView handle the paging.  Where 
>>>>> does it put the data in the interim?
>>>>>
>>>>> Does it cache it on the Client side somewhere?
>>>>>
>>>> It goes back to the database each time you page I suspect when using a 
>>>> datasource.
>>> Right.
>>>
>>> But when you do a DataBind - The database would send you back all the 
>>> data you request at once (unless you are using a Reader) and it would 
>>> have to be stored in some structure while the object is working with it 
>>> (extracting a page for instance) or before the rendering of the page.
>>>
>>> I am just curious as to where asp puts it - in some dataset somewhere?
>>>
>>> For example, I could do an stored procedure call from a 
>>> GridView.DataBind() and 10,000 rows could come back but I only want page 
>>> 5.  The GridView would have to store the 10,000 rows somewhere and 
>>> determine which rows to put on the page.  Could be in a DataSet somewhere 
>>> and when the page is rendered it would go through the dataset to get the 
>>> data it needs.
>>>
>>> Where would the DataSet be?  Since the DataBind() would be done on the 
>>> server, where would the Server put it before it rendered the page.
>>>
>> It goes back each time one pages and reads those 10,000 records every 
>> time. As far as what page to page too and how many lines per page, that 
>> has already been predetermined.
>>
>> That dataset is only good for the life of the page, and if one wanted to 
>> save the dataset and bind to the dataset and not go back to the database, 
>> then on puts the dataset in a session variable and save it, binding the 
>> dataset held in session to the control.
> 
> I understand that.
> 
> I think you misunderstand what I am asking.  This question came up at work 
> today.
> 
> I am trying to figure out where the data is stored while it is rendering the 
> page.  The data has to be somewhere after the result set is returned until 
> the data is rendered to the screen.
> 

The data for a given page is saved in view state, if view state for the 
control has been enabled. The data is in the dataset for the life of the 
page.

0
Mr
4/1/2010 2:21:00 AM
"tshad" <tfs@dslextreme.com> wrote in message 
news:Ol1MaBU0KHA.2196@TK2MSFTNGP05.phx.gbl...
<<>>
> I am trying to figure out where the data is stored while it is rendering 
> the page.  The data has to be somewhere after the result set is returned 
> until the data is rendered to the screen.
>
> Where is it?
>
> Thanks,
>
> Tom
It's in whatever is your datasource.

It is most definitely NOT sent to the client.
With default paging, the gridview takes whichever subset it wants out of the 
datasource.
So you could read data into a collection and cache it before handing it to 
your datasource, which in turn is used by the gridview.
 

0
Andy
4/1/2010 9:31:38 AM
Reply:

Similar Artilces:

limiting text to one page
I program in Access and don't know much about excel, but a customer passed me a workbook and asked me to take a crack at it. I have an excel workbook with a worksheet where the user is asked to enter information about their Agency. The text entered can have paragraphs, etc, but needs to be limited to one page. Is it possible to put a limitation on the amount of text based on the dimensions of the printed page (worksheet)? Before I go any further, it would be good for me to know this. TIA! All depends upon what size font you want to see when printing. In print setup you can set a lar...

Cached Exchange (5.5) Mode & McAfee Issue
We have been on cached exchange mode (on exchange 5.5) for a while with no issues. We recently changed from Symantec AV to McAfee AV and it's GroupdShiled 4.4 version. Now we are seeing sporadic events where users are not receiving the download of cached emails. Neither waiting for updates nor hitting send / receive force the emails down to the client. Deleting the OST and trying to rebuild it has not worked either, in fact it maks it worse as the download will work to a point and then stop. We are waiting permission to call McAfee but in the mean time I would like any informa...

unable to close web pages
ca you help please i am unable to close all web pages when i press close i gett a box on the top of it says microsoft windows and in the midle of the box a message saying internet explorer has stopped working a problem caused the program to stop working correctly, windows will close program and notify you if a solution is available. the internet works ok when i oppen a web page all is ok the problem is only when i press to close the page, i get the box with the message and on the tope of the page where the internet icon is it says webpage error -- zo On Fri, 30 Apr 2010 11:...

Web page-from Pub to Front Page
Hello, I want to convert a doc made in Publisher 2000 to a web page that I can put in Front Page. I tried save as web page and then opened it in FP but the text was all over the place and overlapping. Is there a specific way to do that so that I can work with the text in the paragraphs they were in? Thanks, Catt Nope. If you were to browse our forum at - microsoft.public.publisher.webdesign - you'd find threads where I strongly discourage Publisher customers from trying to use FP with a Pub web. If you are wanting to switch from Pub to FP you should re-design it in FP. David Bartos...

Page numbering #12
A Publisher booklet I created has two blank pages at the end of the brochure. (1) I've tried deleting, but a pop-up box indicates that pages are entered in sets of four. Why? (2) The pages, excluding the cover (first) page are numbered in the footer. How do I eliminate numbering blank pages - assuming that there is a need for blank pages. A booklet by it's very nature is four pages, front, middle and back. A brochure is setup differently, usually on standard letter page, landscape. Insert a second page from the insert menu. -- Mary Sauer MSFT MVP http://office.microsoft.co...

How do I get more than 1 Text Watermark on the page?
Please help me!!!! I need lots of Text Watermarks to appear throughout the page. Noeleen Conlon <Noeleen Conlon@discussions.microsoft.com> was very recently heard to utter: > I need lots of Text Watermarks to appear throughout the page. Copy and paste? -- Ed Bennett - MVP Microsoft Publisher ...

How to treat front & back pages of a booklet as a single page
I have a booklet with 4 pages. With the inside 2 pages if I want a picture to go across both pages it is all very simple. What I can't work out is how to achieve the same effect across the front/back page spread. Do I have to resort to chopping the picture in half and carefully positioning each half on the relevant page so they match up or is there an elegant way built into Publisher that I'm missing. Thanks Make the cover a separate document that's the size of two of the inside pages. -- JoAnn Paules MVP Microsoft [Publisher] ~~~~~ How to ask a question http://suppo...

Synchronize Pivot table page fileter
Hi: I have different tabs in a workbook that contains couple pivot table sharing the same page filter. Is there a VBA function that I can synchronize the selections by changing the filters on only one tab. Thanks Arale Hi Andrew Debra Dalgleish has a download at her site which shows how to do this. http://www.contextures.com/excelfiles.html Scroll down to Pivot Tables and download http://www.contextures.com/PivotMultiPagesChange.zip -- Regards Roger Govier aralew@gmail.com <aralew@gmail.com> wrote > Hi: > I have different tabs in a workbook that contains couple pivo...

set up landscape & portrait page layouts within a file
When I change the page layout (landscape to portrait) for a page, ALL the pages in the file take on the change...how do I set up pages so they don't lose their layout? You need to rearrange the way you're thinking. Instead of mixing the orientation, rotate the pages that you want landscape. :-) -- JoAnn Paules MVP Microsoft [Publisher] "snailkiller" <snailkiller@discussions.microsoft.com> wrote in message news:DD9A714F-9E5B-4B41-BE42-C57751B7B9C6@microsoft.com... > When I change the page layout (landscape to portrait) for a page, ALL the > pages in the...

convert publisher doc to jpeg and line on left page when print
when I convert a publisher document to jpeg, when I print the jpeg a black line appears down the left side. It does not appear on the jpeg when I have it on the screen, or the original publisher doc when I print it. Does it happen to every Pub file or just that one? -- JoAnn Paules MVP Publisher "glenn" wrote: > when I convert a publisher document to jpeg, when I print the jpeg a black > line appears down the left side. It does not appear on the jpeg when I have > it on the screen, or the original publisher doc when I print it. It has happened in all the documen...

PrintScreen and save 2 Internet pages
I have a VBA Form containing a TextBox in wich I type a street address. A Sub() will open simoultaneously 2 internet pages ("http://maps.google.com" & "http://gis.nyc.gov/doitt/nycitymap") at the address indicated in the TextBox and depending on the situation I continue adjusting the web pages (zoom out/in) manually). My question is: If I have several applications opened, can VBA select only my 2 internet pages (adjusted manually) and make automaticaly 2 PrintScreens and save+print the pictures for future reference? (Someone suggested to automaticall...

publishing images in workbook as web page
I have created an workbook with Excel and put a photo on the first page. when I publish the workbook as an web page (interactivity) my photo is missing. Anyone know what I am doing wrong? I have try everything I know to do = insert picture, putting copying photo to clipboard and shift, pasta picture and still logo is missing. Lee ...

Invalid page fault in outlook
need some help: OUTLOOK caused an invalid page fault in module MSOUPLUG.DLL at 0167:10016d58. Registers: EAX=0056f874 CS=0167 EIP=10016d58 EFLGS=00010216 EBX=021e4240 SS=016f ESP=0056f550 EBP=0056f880 ECX=00000000 DS=016f ESI=021e50bc FS=4157 EDX=0056f55c ES=016f EDI=10027924 GS=0000 Bytes at CS:EIP: 8b 01 57 c7 44 24 20 00 00 00 00 ff 50 18 3d 00 Stack dump: 0056f55c 021e4f41 021e4244 00000000 00000104 0056f874 10026058 ffffffff 100140c7 10027924 100278cc 021e4f41 00000001 007917f0 00792dec bff80555 ...

Outlook Today page
I just had to reinstall Outlook and now on the Outlook Today page the option to customize the page is 'hot' but I click it and nothing happens. How do I get it to open up and give me the options to change the appearance of the page? Thanks Vaughn Vaughn <anonymous@discussions.microsoft.com> wrote: > I just had to reinstall Outlook and now on the Outlook > Today page the option to customize the page is 'hot' but > I click it and nothing happens. Asked and answered 100,000 times (literally). Google is your friend. -- Brian Tillman Smiths Aerospac...

CTRL+PAGE UP/DOWN isn't working. Any advice?
Any advice? CTRL+PAGE UP and CTRL+PAGE DOWN don�t move me from on worksheet to another on my computer. I�ve searched the ExcelTip.co forums for solutions already given for this problem and haven�t found solution that works on my machine yet. I�ve tried using: -Tools, Options, Transition(tab), turn off Transition shortcut keys: M transition shortcut keys are turned off. -Scroll Lock is off. I�m using: -Excel 2002 for Office XP -WindowsXP Professional platform -Dell Inspiron 8100 (which is about 2.5 years old) I welcome all suggestions. Thanks -- Message posted from http://www.ExcelForu...

Disable Cached Mode
Hi all! Is there any way to disable Cached Mode (CM) on Exchange 2003? Sure, I can do it with GPO, but some computers can be out of scope of this GPO and then they will be able to turn on the CM in their Offce 2003. But CM is critical security risk and I have to disable it. At http://office.microsoft.com/en-us/assistance/HP010000781033.aspx?Product=out2003 I can read: "Exchange server administrators have the ability to disable this feature in Outlook. For more information, contact your Exchange server administrator. Additional information for administrators is available in the Mi...

Open new windows page
I can right click a topic in a web page and select "Open in new tab" or "Open in new window". Is there a way that I can change settings in IE 8 that will allow me to open in a new window when I just click on it? I realize the right click is a very small inconvenience, but I'd like that option if it's possible. Tab shortcuts include: Open links in a new tab in the background CTRL+click Open links in a new tab in the foreground CTRL+SHIFT+click Close tab (closes window if only one tab is open) CTRL+W or CTRL+F4 View list of open tabs CTRL+SH...

How can I create fax cover page for a contact in Outlook?
I think this should be simple enough, just like in the last contact manager I used. So is there an easy way to creat a one button method of populating a standard fax cover page with a contact's information after looking up the contact? No wizards, no mail merges, just a simple one click method. ...

Register balance and home page balance don't match
The checking balance on the home page, and the balance in the check register don't match. The balance in the register is correct. When I open checking, a window pops up saying the two don't match, click here to learn more, but when clicking learn more nothing happens. Anyone know how to fix it so the two match once again? Thanks. JP In microsoft.public.money, Rhomium wrote: >The checking balance on the home page, and the balance in the check register >don't match. The balance in the register is correct. When I open checking, >a window pops up saying the two ...

how to add pages with different orientations
I am making a publication in which I need some pages to be in a portrait orientation and others in landscape. How can I do this? On Mon, 20 Feb 2006 01:14:26 +0000, Ebony wrote (in article <C7935245-3680-4BE4-BAE5-2B714ED5AD1B@microsoft.com>): > I am making a publication in which I need some pages to be in a portrait > orientation and others in landscape. How can I do this? Ah another pathologically lazy fuckwit who cannot be arsed to STFW before posting. Just by posting this you have proved that you cannot be bothered. This question has been asked - and answered - a...

How I can combine cells of different pages?
I mean how can I add, divide, mutliply, and so on figures of different cells for example, add a figure of the cell f4 of the page 1 with the cell g5 of the page 2. When you say page 1 & page 2 I assume you mean sheet 1 & sheet 2. You can apply mathematic functions for a cell using different sheets but you have to name the source i.e. =A1+Sheet2!A1. An easy way to do this is begin your formula on sheet 1 = A1+ and then go to the cell in the sheet where it resides, click on the cell and click on your active sheet. Excel will automatically place the name reference of the cell...

printing 8.5 x 11 pages on 11 x 17 paper
I am trying to print a newsletter laid out 8.5 x 11 on 11 x 17" paper, so that I can get two pages to a side of paper and print on both sides. My Savin 2055DP has a booklet option, but it automatically shrinks the 8.5 x 11 image, even though it prints correctly in all other aspects. How difficult is it to layout 2 pages on 11 x 17 format in Publisher? Any tricks for pagination, etc.? What is a good reference for layout for me to look at? Jeff Wittenbrink After managing to set up OE-QuoteFix on his new PC, Ed reads a message from Jeff Wittenbrink <jwbrink@aol.com>... &...

Printing 1/2 page postcards
I am trying to print two similarly designed postcards on one page but with different addresses. I am using MS Publisher 2003. Is there any way to do this? thank you Select custom in page setup, type 5.5 in the height box, Publisher will print two per sheet. This is the setup you will use for mail merge and two cards per sheet. If each card is an individual piece, you will have to setup a custom size in your printer. You can use a mail merge or print one card at a time, manually changing the data each time. -- Mary Sauer MSFT MVP http://office.microsoft.com/ http://msauer.mvps.org/ ...

Set default start page + e-mail access issue
I was trying to set my default start page today when I noticed it wasn't available through the "Personalize Workplace" settings on the general tab as I know I've seen it before. I logged in as another users and sure enough it was there even though I was an admin. I found out that when you have the e-mail access set on your user account to "E-mail Router" the option for "Set default start page" goes away and is replaced with a section for choosing the outlook forms you want to view in Outlook. This makes no sense, the option for choosing which st...

print title page setup/sheet can not enter cell in row/column lin
On page setup in the sheet page we can not enter cells into the print titles row or columns. Also the worksheet cell query on these lines will not open. Hi Are you trying do this from Print Preview page, or File|Page Setup? I think it's only possible from the latter. -- Andy. "don r" <don r@discussions.microsoft.com> wrote in message news:26C400D7-14A0-41F8-BBE6-8DF2F5579A30@microsoft.com... > On page setup in the sheet page we can not enter cells into the print > titles > row or > columns. Also the worksheet cell query on these lines will not open. &g...