Effect of enableviewstate = "false" on the ASPX page

Source: Internet
Author: User

It can be said that when the page is closed with viewsate, the access speed of the page will be improved. I tried it today and found a strange phenomenon. Let's talk about it here.

Share it.

Viewstate, however, allows us to add the variables to be passed to viewstate as we use session to save the information to be retained.

When we add enableviewstate = "false" to the instructions on the page, the viewstate defined on the CS page in the background will be ineffective,

It is worth noting that not only viewstate defined by ourselves cannot be used, but the value of some controls disappears after page sending.

For example, the dropdownlist control is used. When enableviewstate = "false" is returned, the value in dropdownlist cannot be obtained.

In some Web controls, after the autopostback attribute is enabled, the previous values of the control can still be saved after the page is sent back, that is, the viewstate

This feature.

A small detail, hoping to help some friends who need it.

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.