验证服务器控件语法。
添加一个RegularExpressionValidator控件,在服务器端来验证用户输入的数据。
I have added a RegularExpressionValidator to validate user entries on the server side. It USES the following expression.
当该页发回服务器时,服务器可以分析、验证、并将此视图状态数据应用回该页的控件树。
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.
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.
图9所示的是测试RegisterUser页面,它展示了在HTML模式下,从用户角度看到的服务器验证器控件的外观。
Figure 9 shows the test Register user page, which demonstrates how the server validator controls look from a user perspective in HTML mode.
为服务器验证控件构建服务器端验证器。
Build the server-side validator for the server validator control.
我还会介绍如何构建一个启用了Ajax的服务器验证器控件,该控件通过对数据验证服务器执行异步调用验证HTML控件的值。
I also describe how to build an Ajax-enabled server validator control that validates a value of an HTML control by performing an asynchronous call to the server that validates the data.
服务器验证器控件的taglib库定义项(具有针对每个属性描述的内嵌注释)如清单19所示。
The server validator control's TagLib library definition entry (with embedded comments for a description of each attribute) is shown in Listing 19.
如果要执行服务器上的验证,不执行客户机上的验证,您可以将单独验证控件设置为不生成客户端脚本。
If you want to perform validation on the server but not on the client, you can set an individual validation control to not emit client-side script.
获取或设置按钮控件回发到服务器时所导致验证的控件组的名称。
Gets or sets the name for the group of controls for which the button control causes validation when it posts back to the server.
在连接字符串中指定相应的ODBC驱动程序以及相关的服务器和身份验证信息,可以将该控件连接到ODBC数据源。
You connect the control to an ODBC data source by specifying the appropriate ODBC driver in the connection string along with relevant server and authentication information.
在连接字符串中指定相应的ODBC驱动程序以及相关的服务器和身份验证信息,可以将该控件连接到ODBC数据源。
You connect the control to an ODBC data source by specifying the appropriate ODBC driver in the connection string along with relevant server and authentication information.
应用推荐