Tip 10-server Control View state.
技巧10—服务器控件视图状态。
那么视图状态的情况呢?
Do the same with another view state.
对另一个视图状态执行相同的操作。
Drag a View state and name it admin.
拖拽view state并将其命名为admin。
To be able to return to the admin View state.
您按照下面方式,来返回到adminView状态。
Link the View state with the End state using a transition.
使用一次转换将View state与End state联系起来。
There are a number of drawbacks to the use of view state, however.
然而使用视图状态也有一些缺点。
Link the Flow configuration element with the View state using a transition.
使用一个transition来将Flow配置元素与View state联系起来。
There are many issues with view state in ASP.NET 1.x, as I indicated earlier.
正如我早前指出的,在ASP.NET 1. x中,ViewState有很多问题。
As an example of view state in action, try running the page shown in Figure 1.
作为一个活动的ViewState示例,尝试运行图1显示的页面。
Instead, they can defer that decision to assembly time by signaling their view state change.
相反,它们应该向外传播它们的视图状态变化,从而将确定应用程序流的任务推迟到组装时。
Similarly, the DataGrid class USES view state to issue pagination, edit, and sorting events.
同样地,datagrid类使用ViewState发布分页、编辑和排序事件。
If an admin event occurs (URL or button click), the admin webflow will go into the view state admin.
如果发生了一次admin事件(url或者按钮点击),那么adminwebflow将会进入到视图状态admin中。
Using nonprintable characters to delineate the objects stored in view state serves two purposes.
使用非打印字符分割 ViewState中存储的对象有两个目的。
View state can also be hashed or encrypted to prevent a user from tampering with or decoding it.
还能对ViewState进行哈希或加密,以防止用户篡改或解码。
Because you did not specify any page for this view state, by convention admin.jsp will be served to the user.
通过使用admin . jsp,因为您不能为该视图状态指定任何页面。
Second, and more importantly, it reduces the number of characters used to encode the objects in view state.
第二个,也是更重要的目的是它减少了为ViewState中的对象编码所使用的字符数量。
View state is a fancy name for ASP.NET storing some state data in a hidden input field inside the generated page.
视图状态是一个有趣的名称,用于表示在所生成页的隐藏输出字段中存储一些状态数据的ASP.NET。
If we do the same in 2.0, the size of view state is reduced to 6,728 characters, a reduction of nearly half.
如果在2.0中也这样做,ViewState大小减少到6,728个字符,几乎减少了一半。
For those of you building controls, the usage model for control state is not quite as convenient as view state.
对于您的那些生成控件,控件状态的使用模型不像ViewState一样方便。
The exception to this is that some controls also use view state for behaviors as well as plain-state retention.
例外情况是,一些控件既使用ViewState保留行为,也保留一般状态。
So it's either populating the controls, setting view state, applying themes, etc., everything happens on the page load.
因此,不是填充控件、设置viewstate、应用主题等一切都发生在页面加载上。
There is one other important place where view state is used, and that is in controls that issue server-side change events.
使用ViewState 的另一个重要之处是在控件中发布服务器端更改事件。
The stored message is retrieved from PortletSession, when the portlet is in view state, as described in the following sections.
当Portlet 处于视图状态时,可以从PortletSession检索存储的消息,如以下部分所述。
To see what happens when view state is not enabled, try adding enableviewstate='false' as an attribute on the span element.
如果想知道 ViewState 不可用时发生的事情,尝试添加enableviewstate='false'作为范围元素的一个属性。
There is also an additional overhead incurred when serializing or deserializing view state data that is posted back to the server.
对发回服务器的视图状态数据进行序列化或取消序列化时,也会发生额外的开销。
Unfortunately, if you want to use features like sorting, paging, or editing in the DataGrid, you cannot disable its view state.
遗憾的是,如果您想要使用DataGrid中诸如排序、分页或编辑的功能,则不能禁用其ViewState。
It is important to note that if the request is a postback, the values of the controls have not yet been restored from view state.
需要注意的是,如果请求需要进行回调,那么这些控件的值是不能够在viewstate中被缓存的。
With view state, developers can focus on the programming model and user interaction without having to worry about retaining state.
使用ViewState,开发人员能够专注于编程模型和用户界面,而不用担心状态保持。
With view state, developers can focus on the programming model and user interaction without having to worry about retaining state.
使用ViewState,开发人员能够专注于编程模型和用户界面,而不用担心状态保持。
应用推荐