Raymond Lewallen

Sponsors

The Lounge

Advertisement

Images in this post missing? We recently lost them in a site migration. We're working to restore these as you read this. Should you need an image in an emergency, please contact us at imagehelp@codebetter.com
Viewstate chunking example in 2.0

Yesterday I talked briefly about Viewstate chunking. I am not aware of any publicly available resources or samples on view-state chunking. However, here’s an example of what chunking may look like (with a heavy emphasis on may):

<pages maxPageStateFieldlength="1000" .. >

Resultant page

<input type="hidden" name="__VIEWSTATEFIELDCOUNT" value="3" />
<input type="hidden" name="__VIEWSTATE" value =".." />
<input type="hidden" name="__VIEWSTATE1" value =".." />
<input type="hidden" name="__VIEWSTATE2" value =".." />

In this example, the page state is split into a number of fields. Since the size of the combined state is 3000, the page state is split into 3 hidden fields, along with a hidden field indicating the count of fields. Notice that each view-state chunk (after the first one) is appended with a count index.

Currently listening to: Shimmy - System of a Down


Posted 02-23-2005 2:27 PM by Raymond Lewallen
Filed under:

[Advertisement]

Comments

Scott Galloway wrote re: Viewstate chunking example in 2.0
on 02-23-2005 2:40 PM
This is almost exactly what Paul Wilson does in the example I metioned in the comment to your previous post.
Raymond Lewallen wrote re: Viewstate chunking example in 2.0
on 02-24-2005 4:41 AM
Yes it is Scott, except now you won't have to write all the code. It only takes one line, the maxPageStateFieldlength attribute, to be set and that's all there is to it. Maybe somebody on the MS team found Paul's post and implemented it into 2.0?
Scott Galloway wrote re: Viewstate chunking example in 2.0
on 02-24-2005 10:07 AM
Ah, sorry, misunderstood! I thought you were planning to implement this yourself. I obviously failed to read the original post closely enough. Sorry!

Add a Comment

(required)  
(optional)
(required)  
Remember Me?