What is ViewState?

Source: Internet
Author: User

I met ViewState when I was doing ASP, and I didn't know what he meant.

The data is saved on the current page.

Like sessions. is session-level. As long as the session does not expire. The data stored in the sessions is in.

ViewState are page-level. As long as this page is stored in. ViewState data.

This means that the data stored in ViewState can only be used in the page that declares the variable.

For example, in a page Page_Load declared: viewstate["test"]= "FDASFDSA";

Then you can use viewstate["test" in any of the methods in the page to get the value "FDSAFDSA" directly. Preliminary understanding, follow-up and add ......... .....

What is ViewState?

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.