自定义验证是客户端控制还是服务器端? [英] Custom validation is client side control or server side?

查看:59
本文介绍了自定义验证是客户端控制还是服务器端?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道自定义验证是客户端控制还是服务器端控制?

I want to know that Is Custom validation is client side control or it is server side control?

推荐答案

ASP.NET中的所有验证控件都是客户端控件。请先把GOOGLED问到这里......
All Validation Controls in ASP.NET are Client Side Controls. Please GOOGLED before putting your question here...


当然客户端伙计但是使用自定义验证有两个好处,一个是你可以添加javascript功能nd验证控件,第二个是你可以调用服务器端方法也............
ofcourse client side dude but using custom validation have two benefits one is you can add javascript function nd validate controls and second is you can call server side method also ............


所有验证控件都必须在客户端本身进行,以减少服务器端脚本,因为它必须与服务器交互或者服务或数据库等,

但是在某些应用程序或某些人会为了安全而双方进行验证,

因为假设你使用javascript意味着某些系统可能会被禁用或jquery文件未加载意味着它可能导致错误的验证。这就是为什么有些人会在两端都这样做。
All validation controls are must be made in the client side itself to reduce the server side scripting as its has to interact with server or service or database etc.,
But in some applications or some people will do validation in both sides for safety,
because suppose if your using javascript means some systems may disabled or jquery file not get loaded means it may results to wrong validation. Thats why some people will do in both ends.


这篇关于自定义验证是客户端控制还是服务器端?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆