zoukankan      html  css  js  c++  java
  • __VIEWSTATE

    The value of this element is a base64-encoded string that acts as a state repository for the page. Any elements on a page whose contents are not implicitly posted back via the standard form POST mechanism have their values saved to and restored from this hidden field. It is also used to propagate supplemental state for controlsor example, what prior value was stored in a control so that server-side change notifications can be issued. While the technique of propagating state using hidden input fields is common practice in Web applications, ASP.NET takes it a step further and uses it to unify the server-side control model by ensuring that all elements marked with runat=server retain their state across post-backs.

       

    VIEWSTATE就是发送到client端的当前页面的状态, 但貌似只有在代码中赋予的值(方式2)才会在GET请求时被包含在VIEWSTATE, 而对于页面中直接指定的值(方式1), GET请求中不会被包含在VIEWSTATE.

       

    方式1:

    编译出来的代码为:

       

    方式2:

       

       

    编译出来的代码为:

       

  • 相关阅读:
    基于Hadoop的数据仓库Hive
    hadoop课堂测试之数据清洗
    实验6:Mapreduce实例——WordCount
    暑期--第五周
    暑期--第四周
    暑期--第三周
    暑期--第二周
    软件工程——个人课程总结
    周计划03(20201005-20201011)
    周计划02(20200928-20201004)
  • 原文地址:https://www.cnblogs.com/smwikipedia/p/2190411.html
Copyright © 2011-2022 走看看