Asp.net验证服务器端 [英] Asp.net Validation ServerSide

查看:91
本文介绍了Asp.net验证服务器端的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好
我想从服务器端验证文本框以限制某些外来字符,但在验证过程中还要显示允许哪些字符.

我不想显示允许字符,是否有任何代码可以显示限制字符的允许字符检查.

谢谢

Hello All
I want to validate a text box from server side to restrict some foreign character , but during validation want to show which character are allow too.

i donot want to display the allow character , Is there any code which will show me the allow character check with the restrict character.

Thanks

推荐答案

是否有任何代码
为什么要求输入代码?听起来好像您需要"正则表达式".

制作正则表达式以限制不允许使用的字符并使用它.这也可以在客户端完成(而不是在服务器上检查!)
Is there any code
Why ask for code? Sounds like you are in need of ''Regular Expression''.

Make a regular expression that restricts the characters not allowed and use it. This can be done on client side too (instead of checking it on server!)


这篇关于Asp.net验证服务器端的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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