Strategies for reducing ViewState size in asp.net

后端 未结 6 1596
星月不相逢
星月不相逢 2021-01-12 18:17

I use \'n\' number of server controls in my page. Now I am into performance tuning and I\'ve noticed that my ViewState is too large and it makes my page slow.<

6条回答
  •  难免孤独
    2021-01-12 18:46

    Assuming the size of viewstate is the main cause of the 'slowness', I would like to suggestion you tackle it from a more holistic approach.

    You have 'n' number of server controls, do you need all 'n' numbers to be server controls and not just plain HTML?

    Say you really need all 'n' of them, do all of them need to have viewstate enabled?

    Here is one good article (if you haven't already read) which provides more insights: VIEWSTATE size minimization

提交回复
热议问题