我先前提过,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.
若要在服务器端使用用户输入的值,则获取并设置绑定到控件的数据元素。
To work with user-entered values on the server side, you get and set the data elements bound to the controls.
为服务器验证控件构建服务器端验证器。
Build the server-side validator for the server validator control.
它还与控件进行数据绑定,并访问服务器端数据。
It also does data binding with controls, and accesses server-side data.
BLL包括向支持Ajax的控件提供数据的值提供程序,以及为HTML表单数据提供服务器验证的服务器端验证程序。
The BLL consists of value providers that provide data to the Ajax-enabled controls, and server-side validators that provide server validation for HTML form data.
使用ViewState 的另一个重要之处是在控件中发布服务器端更改事件。
There is one other important place where view state is used, and that is in controls that issue server-side change events.
NET页作为一个单元运行,它将该页中的服务器端元素(如控件)与您编写的事件处理代码结合在一起。
NET page runs as a unit, combining the server-side elements in a page, such as controls, with the event-handling code you have written.
然而,应用程序开发人员必须生成这些控件,在客户端中加入业务逻辑,并且开发一个应用特定的方式来与服务器端交互数据。
However, application developers have to manipulate these components, glue them with business logic at the client, and develop an application-specific way to exchange data with the server dynamically.
然而,应用程序开发人员必须生成这些控件,在客户端中加入业务逻辑,并且开发一个应用特定的方式来与服务器端交互数据。
However, application developers have to manipulate these components, glue them with business logic at the client, and develop an application-specific way to exchange data with the server dynamically.
应用推荐