Question regarding ViewState

Vic Carter asked on October 24, 2014 19:11

While debugging another issue, our designer noticed that the hidden viewstate field was ridiculously large(600k characters). So I started adjusting the viewstate settings for individual controls. Now it is down to about 4k, however, this template is a clone of one being used on several sites and while some of them share the viewstate issue, the very first implementation only has a viewstate of about 300 characters. All pages affected have multiple controls. Several repeaters, a search box, some editable text areas, etc.

What is a common size for the hidden viewsstate field? What should I be looking at to reign this in. Is this a problem? We have several sites already deployed and no one has mentioned any issues with load times that have not been able to be attributed to server updates or other such maintenance. Just trying to make sure I have not done something negative to performance.

Thanks for any information.

Recent Answers

Yehuda Lando answered on October 24, 2014 19:34 (last edited on October 24, 2014 19:34)

That seems very large. Try enabling view state debug and see what you have there

0 votesVote for this answer Mark as a Correct answer

Virgil Carroll answered on October 24, 2014 19:41

Does these templates have custom webparts or coded components? If so, you are probably using the default method of carrying persistent variables and information. In Kentico you have the ability to save states in the page output caching. You disable your viewstate and try storing there. Kentico gives you a lot of power to manipulate how the output cache store information and when it refreshes.

Check these two pages: (Its Kentico 8, but works the same in 7)

1 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.