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!)