tags:

views:

38

answers:

2

Hi folks

 my web site structure is like this :
    1- master page with stylesheet and scripts
    2- aspx which render (number 3)
    3- web user control and scripts inside them

 in the number 3 I have some javascript that are call some ajax method they are about 20 lines code and I can not move them to js file in order to using <%= myAspControl.ClientID %> for some purpose

 my default.aspx is so heavily now I checked it by google chrome developer tools it is equal to 2.7MB for document only document not images or style sheet.
I have about ten controls but I think it is effect on viewstate and encoding them it creates all in default.aspx dynamicly and make it so heavy.

+1  A: 

Have you read these SO-suggestions to minimize ViewState?

Tim Schmelter
A: 

That seems like poor ViewState use. I saw it in a project with some Telerik controls, which had a feature that stored the whole data source in the ViewState / which included more than was being displayed.

Keep the ViewState to what's absolutely necessary. Don't try any clever workaround, you should never store large amount of info in the view state.

eglasius