What is a good way to determine what is in my view?

I have a page with a huge view (> 300 KB) .... Yes, I know. I narrowed down this anomaly to a single user control, but I was having trouble figuring that this control was there.

I overridden SavePageStateToPersistenceMedium on the page, but didn't work very well with the viewstate passed in. Can I pass it to some recursive function that will print everything in the object?

I tried using freely available viewstate decoders, but no one worked. I always get errors when trying to deserialize a viewstate.

I am very looking for a code snippet here.

Thanks,
mark

Thanks for tracking the suggestions, especially. next .axd subject. But it still only tells me how great the controls are, it doesn't tell me what the view is. I want to see if there are objects that I mistakenly serialize in viewstate.

+5
source share
4 answers

I used to use trace.axd. It lists each request and downloads the contents of the viewport. You need to enable tracing in web.config. If you have many requests, you will want to update the cache size by more than 10.

+1
source
+1
source

viewstate, , viewstate. / : http://www.testingreflections.com/node/view/3424.

: pages web.config:

<pages ... viewStateEncryptionMode="Never" ... />

msdn doc MachineKey ASP.NET 2.0

0

Trace = "true" . .

0

All Articles