I have been doing some operations based on. net web application performance testing, the test tool often records the hidden attribute _ viewstate, and often finds that this attribute has some problems in "association, the request may fail. Sometimes the value of this attribute is very long. For example, it exceeds 2000 bytes and is repeated in the script over and over again, seriously affecting the readability of the script.
Therefore. in config, the topic is disabled, but it does not take a deep look at what this topic is, why it appears, and what effect it has on the authenticity of the test.
Today is a bit blank. I found an authoritative document and learned about it.
ASP. NET viewstateHttp://www.microsoft.com/china/community/program/originalarticles/techdoc/viewstate.mspx
Below is a summary.
-------------- Begin ---------------
Viewstate is a mechanism that ASP. NET uses to track the status values of server controls. Otherwise, these values are not returned as part of the HTTP form.
ASP. NET viewstate is a new State service that allows developers to track the UI state based on each user. Viewstate is nothing mysterious. It only uses an old web programming technique to pass the State back and forth in a hidden form field.
By default, viewstate is enabled, and the content stored in viewstate is determined by each control (rather than page developers. Sometimes, this information applies to applicationsProgramIt is useless. Although there is no harm, it will significantly increase the size of the page sent to the browser. Therefore, if you do not need to use viewstate, you 'd better disable it, especially when the viewstate is large.
When viewstate is used, each object must be first serialized to viewstate, and then deserialized through callback. Therefore, viewstate is not a cost-effective method.
Disable viewstate -- application (in Web. config): <pages enableviewstate = "false "? />
If viewstate is not mandatory in an application and a large viewstate is automatically generated to affect the performance, disable it.
-------------- End ---------------