Got more questions? Find advice on: SQL | XML | Regular Expressions | Windows
in Search
Welcome to AspAdvice Sign in | Join | Help

Justin Lovell's Blog

Mood: The Grumpy Coder

Understand ASP.NET View State

One of Scott Mitchell's articles that I proof read is hot on the plate at MSDN ASP.NET Development Centre. I see that a few of my suggestions made it through to the final article and I am quite proud of myself :-). Anyway, expect an add-on article to Scott's one, from me which will be published ASP Alliance. My article will deal with the suggestion of saving the view state to disk but using GUID's to identify different pages being used. Scott's code will lack if the same user requests the same page over two concurrent browser windows and the first one posts back before the second. In example:

  1. First browser's viewstate is saved to disk.
  2. Second browser's viewstate is saved to disk.
  3. Some operations of post back will occur on the second browser.
  4. Then a post back will occur from the first browser.
  5. And a possible KUBOOOOOOMM from an atomic bomb may go off on that last request :-).

The date that I will finish my article by: Monday. When it will be published to the internet, it will be up to the editors at ASP Alliance.

Sponsor
Published Thursday, June 03, 2004 8:20 PM by jlovell

Comments

 

jlovell said:

Hi,
It sounds like your article will be more informative for developers like me!

I read Scott Mitchell's article in MSDN few weeks before, that is very good enough for beginers as well as core developers to understand the ASP view state in-depth.

Eagerly looking to read your new article, Please post the link after it is published.

Thanks.
June 3, 2004 8:55 PM
 

jlovell said:

Mooo
June 5, 2004 8:44 PM
 

jlovell said:

Hey John,

I am almost finished my article. I first had to explain where and why Scott's code will fail. My code is very similar to yours but there is one thing that I do not agree on as such :-).

That is the deletion of the view state file as soon as the post back is fired. The reason is that you never took in consideration for:

a) failed/incomplete requests (those stupid dialups... you can't predict them :-)). Also, there may be network disruptions (not all ISP's in the world are perfect ;-)).

b) The user will be unable to pass back and forth in their history. They will be unable to do some post backs which can lead to complaints of "bugs."

However, I do have an alternative plan with the "droplets" (dung/s**t) of the view state files. But you will have to be patient with my article to get the final plan :-).

Cheers,
Justin

BTW Varad, I WILL post the link up once it is pubblished.
June 5, 2004 9:06 PM
 

jlovell said:

Hi Justin,

Yea....I realized my screw-up soon enough.

I added the File.Delete() during testing because all the files that were added meant less room for my MP3 collection. ;-).

Working now on a Service that will delete the files at a scheduled point.

I look forward to your article.

John
June 5, 2004 11:36 PM
 

jlovell said:

Thanks, Justin
June 6, 2004 7:18 AM
Anonymous comments are disabled