How to minimize viewstate size of a page in asp.net?

前端 未结 6 1671
天命终不由人
天命终不由人 2020-12-25 08:33

How to minimize viewstate size of a page in asp.net? Please help.

6条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-25 09:25

    I chose to save the view state on the server in a database itself and not allow it to be passed in the HTML to the client which bloats the page size. You can extend the HiddenFieldPageStatePersister and work around this. I have written a detailed article around this if you wish ...

    http://ashishnangla.com/2011/07/21/reducing-size-of-viewstate-in-asp-net-webforms-by-writing-a-custom-viewstate-provider-pagestatepersister-part-12/

提交回复
热议问题