验证服务器控件 (validation server controls) 包含在 ASP.NET 中的一组服务器控件,用于验证用户输入。当有来自 HTML 服务器控件和 Web 服务器控件(例如 Web 页窗体)的输入时,将根据程序员定义的要求对输入内容进行检查。验证控件在服务器代码中执行输入检查。如果用户使用的浏览器支持 DHTML,则验证控件也可使用客户端脚本执行验证。
验证服务器控件语法。
添加一个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.
应用推荐