TRULY Understanding ViewState, the comment index

A long time ago I published one of my first blog entries, TRULY Understanding ViewState. And what an experience it has been. It was pretty popular with commenters, so much so I decided to spin off a whole series of articles, TRULY Understanding Dynamic Controls based on some of the issues people were asking me about.

In the meantime, TRULY Understanding ViewState has accumulated over 250 comments! Most are questions from developers facing problems they cannot solve or architects seeking advice on how to approach a project. I've tried hard to answer each and every commenter with a meaningful answer. I have missed some, but I haven't forgotten about them -- they are still in my outlook inbox with that little red flag on them.

I do enjoy helping people, and I don't expect anything in return -- but here's a reader who really gave back. Trevor Morrison painstakingly combed through each and every comment in TRULY Understanding ViewState, categorized and indexed them, and compiled them into a 69 page word and pdf document! I cannot even imagine how much work that was, thank you Trevor!! He even took the time to highlight key statements throughout. I remember college, and how great used books were, because usually some overachiever had already highlighted all the important parts for me.

Trevor has also been gracious enough to let me publish the index here, for all of you to benefit.

Behold, just one page of the table of contents.

TRULY Understanding ViewState Comments Index - Table of Contents


And a random page within... notice the category.


TRULY Understanding ViewState Comments Index - Example Page


Download the TRULY Understanding ViewState Comment Index [word]. Also in PDF.

If for any reason the above links do not work for you, try the mirror site below, courtesy of Colin Bowern:


  • many, many thanks for your efforts, you (both) helped me "truly understand viewstate" - at least I think so:)

  • What a perfect and touching work!

    Power of Community is Power of Sharing ...

  • That article, and the dynamic controls series are pure internet gold.  They should be mandatory reading for anyone coming into the world. In my opinion they are problably the two most important articles i've found in regards to "truly understanding"   I'd love to see more articles from you along those lines.  

  • Thanks for you service in the truely competitve age.

  • Dude, that's a book. Publish it!

  • The article "TRULY Understanding ViewState" is really really really good, and i am planing to write about your article in my blog.

    Thanks vey much!

  • While I appreciate Dave's warm thanks (who wouldn't?), I was just glad to make the vital content of the discussion about "Truly Understanding Viewstate" even more accessible. It's to Dave that the developer community should continue to direct their thanks.

  • Thanks so much for your articles... awesome.

    I believe a light went on for me and I'd like to confirm this:

    If I have a dropdownlist control, I don't need the viewstate to "remember" the selected value for me as long as the control is always visible (meaning it will always post its value back, meaning the ProcessPostData event will persist my selected value automatically)

    If I get into hiding and redisplaying the control over different postbacks, THEN I need the viewstate to remember my selected value for me (only when the control is not present to post the value back)(view state would also remember other non-posting properties like Visible=false).

    The above is also true, if databinding is used, as long as the databinding is performed in the OnInit event - so that the control is databound and populated BEFORE the ProcessPostData event.

    Is all of that correct?

  • Holy chowder!!! Hats off to both Dave & Trevor. Those were both good reads and I now have a better understanding on the subject.

    Cheers guys...


  • hi, Dude, that's a book. Publish it.

  • Thanks a million for spending all that time explaining this non-obvious stuff! Very helpful.

  • Hi ,

    I want to make one cutom control i am trying to make one multiselect dropdownlist. So i created one class inherited from usercontrol and oninit i added one listbox and text box and one button. Arranging them so that it will look like a combo box. I am puting enableviewstate flase in page level. So , i am binding my listbox oninit event of the page. However, when i do postback by clicking any other button of the page then selected item persists but, OnSelectedIndexChanged event raised automatically. I do not want to raise OnSelectedIndexChanged i just want to do postback. Can you tell me how to overcome this.

    Thanks in advance

  • Thanks for providing information making "Truly Understanding Viewstate" more available and understandable. Keep the good articles coming. Many Thanks

  • I'm posting this here since comments are closed on the original post. A lot of the comments said to call the Master property getter during PreInit to get the child controls created. This no longer works with .Net 4.

Comments have been disabled for this content.