Viewstate Displayer Control

None of the “after the fact” ViewState decoders, like WilsonDotNet’s or Fritz Onion’s, have ever worked for me. I always get strange errors, and I’ve never been able to figure out why. So, I decided to create a server control which can be placed directly onto the page you’re trying to performance tune. It’s called Viewstate Displayer Control, and you can see a demo of it in action in my sandbox. It displays a DHTML tree of all of the controls on the page, and the items that they have stored in viewstate. It’s not very fancy, and doesn’t support a ton of data types, but it should be helpful in a pinch.

It’s also nowhere near as cool as the decoders that let you take the viewstate from an existing page and analyze it. You have to add the control to your page in order for it to work, something you probably won’t want to do in production ;). However, if you’re like me and the non-invasive decoders haven’t work for your pages, you now have another option.