In Asp.net, viewstate is put on the page to save the status of the Page Object and transmitted between the server and client, which leads to a waste of network bandwidth. Optimized for Asp.net ArticleNormally, we recommend that you use as few server controls as possible and put as few large objects as possible into viewstate. In addition, viewstate uses base64 encoding, which makes it inconvenient to save important data. In fact, this problem can be easily solved: by rewriting the page. loadpagestatefrompersistencemedium and page. the savepagestatetopersistencemedium method can save viewstate data to the hard disk and put the latest viewstate to the cache. In this way, if the customer does not click the back button of the browser, each viewstate is loaded by accessing the cache. Even if the back button is clicked, you can easily load viewstate records from the hard disk, greatly accelerating the application response speed.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service