加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 编程开发 > asp.Net > 正文

ASP.NET服务器端或客户端的验证控件?

发布时间:2020-12-16 06:50:18 所属栏目:asp.Net 来源:网络整理
导读:ASP.NET中的验证控件是否适用于服务器端和客户端?或者它仅用于客户端验证? 谢谢 解决方法 ASP.NET验证控件执行客户端和服务器端验证. EnableClientValidation是禁用客户端验证的属性. 引自MSDN Document for ASP.NET Validation Controls Validation contr
ASP.NET中的验证控件是否适用于服务器端和客户端?或者它仅用于客户端验证?

谢谢

解决方法

ASP.NET验证控件执行客户端和服务器端验证. EnableClientValidation是禁用客户端验证的属性.

引自MSDN Document for ASP.NET Validation Controls

Validation controls perform input checking in server code. When the
user submits a page to the server,the validation controls are invoked
to check the user input,control by control. Validation occurs after
page initialization (that is,after view state and postback data have
been processed) but before any change or click event handlers are
called.

ASP.NET performs validation on the server even if the validation
controls have already performed it on the client,so that you can test
for validity within your server-based event handlers.

You can invoke validation in your own code by calling a validation control’s Validate method

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读