将当前控件状态保存在viewstate中。
在这个阶段,所有的控件都从视图和控件状态中获取了信息。
In this stage controls are loaded with information retrieved from view and control states.
通常,这种动作定义为触发控件状态改变或者选择一个对象。
In general, this action is defined as triggering a state change in a control or selecting an object.
图5显示的是目前使用控件状态的控件列表及其存储的属性,供您参考。
Figure 5 shows a list of the controls that currently make use of control state and what properties they store there for your reference.
在页已完成对页和页上控件的所有视图状态和控件状态信息的保存后发生。
Occurs after the page has completed saving all view state and control state information for the page and controls on the page.
对于您的那些生成控件,控件状态的使用模型不像ViewState一样方便。
For those of you building controls, the usage model for control state is not quite as convenient as view state.
因此,后面的控件状态更改应视为有效指示符,表示控件已更改(“更新”)。
As a result, subsequent changes to the control's state should be considered valid indicators that the control has changed (is "dirty").
这些改进包括:减少编码数量,采用控件状态从内容中分离出行为状态,以及智能集成数据绑定控件。
These improvements include a reduction in encoding size, the introduction of control state to separate behavioral state from content, and intelligent integration with data-bound controls.
对于ASP.NET页面,Form可以提交自身,并且ASP.NET模型提供了控件状态管理和postback事件。
In ASP.NET pages, a single form can post to itself, and the model provides for generalized control state management and postback events.
我建议您现在使用ASP.NET 2.0时开始遵循这个原则,但是DataGrid还未重构以保留控件状态中的行为状态。
I would like to tell you to start following this recommendation now with all work done in ASP.NET 2.0, but the DataGrid has not been refactored to keep its behavioral state in control state.
幸运的是,新的GridView是DataGrid的逻辑继承者,它像TextBox和DropDownList控件的新版本一样正确使用控件状态。
Fortunately, the new GridView is the logical successor to the DataGrid and it USES control state properly, as do the new versions of the TextBox and DropDownList controls.
有2个可切换的主卷和2个可切换的状态控件。
There are 2 switchable master volumes and 2 switchable presence controls.
这个选项允许为状态更新消息实现定制控件和表单逻辑。
This option allows for custom controls and form logic to be implemented for status update messages.
它提供了自动或即时的代码检入和检出、简洁的修饰符,从而可以轻松地标识源代码控件中的对象及其状态。
It provides automatic or prompted check-in and check-out of code, neat decorators to easily identify which objects are in source control, and their status.
如果您不发回页,或者总是针对每个请求重新生成页上的控件,则应该在页级别禁用视图状态。
If you are not doing postbacks in a page or are always regenerating the controls on a page on each request, you should disable view state at the page level.
登录状态控件注意到此信息并允许你退出。
The login status control notices this and changes to allow you to log out.
当该页发回服务器时,服务器可以分析、验证、并将此视图状态数据应用回该页的控件树。
When the page is posted back to the server, the server can parse, validate, and apply this view state data back to the page's tree of controls.
例如,如果你希望为用户显示一个漂亮的登陆按钮,可以通过设置登录状态控件的Login (Out)ImageUr l属性来实现。
For example, if you would rather display a pretty button for the user to log in or out, set the login (out) ImageUrl properties on the login status control.
技巧10—服务器控件视图状态。
对于同一X Forms,您可以在一台客户机上将其表示成一个页面而在另一台上将其表示成多个页面,而不必为保存状态以及表示适当的导航控件而担心。
You can present the same XForms as a single page on one client and as multiple pages on another, without having to worry about saving state and presenting appropriate navigation controls.
测试自动化检查测试应用程序的结果状态,验证Listbox 控件包含正确的消息,并记录“pass”结果。
The test automation checks the resulting state of the application under test, verifies that the listbox control contains the correct message, and logs a "pass" result.
例外情况是,一些控件既使用ViewState保留行为,也保留一般状态。
The exception to this is that some controls also use view state for behaviors as well as plain-state retention.
Becky:ARIA定义要添加到DHTML控件中的角色和状态元数据。
Becky: ARIA defines the role and state metadata to be added to a DHTML control.
我先前提过,ASP.NET 1. x中使用服务器端控件最另人沮丧的一面是关于ViewState的非全有即全无的状态。
I mentioned earlier that one of the most frustrating aspects of working with server-side controls in ASP.NET 1.x is the all-or-nothing mentality with respect to view state.
这很重要,因为 ASP.NET中的大部分服务器端控件模型是根据这样一个假设生成的,那就是 —如果用户回发到相同页面,所有控件保持其状态不变。
This is important because much of the server-side control model in ASP.NET is built around the assumption that all controls retain their state if the user posts back to the same page.
除了在创建时分配角色和状态外,状态必须在控件发生更改时进行更新。
In addition to assigning roles and states at creation time, the states must be updated as the control changes.
除了在创建时分配角色和状态外,状态必须在控件发生更改时进行更新。
In addition to assigning roles and states at creation time, the states must be updated as the control changes.
应用推荐