2

Possible Duplicate:
How to decode viewstate

Hi again. I have an application which has a viewstate size of about 40KB which is MUCH more than it should be. I only store some simple vars in the Viewstate. I already disabled ViewState for the grids which I thought would cause that issue but they weren't the "bad" ones.

Is there any way to loop through each viewstate element and show its size? Like: ViewState["userId"]=2KB, ViewState["guid"]=5KB and so on?

I don't really care in which way I get this information. Coding in C# would be nice but a firefox-plugin would also be nice.

Community
  • 1
  • 1
Ole Albers
  • 8,715
  • 10
  • 73
  • 166

1 Answers1

2

If you turn on tracing then you should get some information about each control on the page and the size of it's viewstate. There should be a "Control Tree" section that has a "ViewState Size Bytes" column for each control on the page. Hope that helps.

ataddeini
  • 4,931
  • 26
  • 34
  • +1 also see this [msdn post on tracing](http://msdn.microsoft.com/en-us/library/ms972204.aspx) – Bala R Apr 23 '11 at 13:31
  • Arg! I already tried that but because of my small laptop-screen I only did see until the column "type". I did not scroll to the right to see if there is more information like - well "viewstate-size" %-) thanks a lot. – Ole Albers Apr 23 '11 at 15:42