在asp.textbox中限制除英语之外的其他语言 [英] Restrict the other than English Language in asp.textbox

查看:101
本文介绍了在asp.textbox中限制除英语之外的其他语言的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hai Code项目团队,





我对asp.net怀疑。我现在的网络应用程序提示用户输入用户asp:textbox中除英语以外的文字。





我的要求如下

1。提示用户在asp中输入非英语语言。文本框。

例如:asp:textbox用户只能输入像az AZ这样的英文字母,而不是像德语,西班牙语,泰卢固语,泰米尔语,印地语等语言。

如果输入非英文单词提示,用户请仅输入英文单词。如果有可能请帮忙。



+ ve测试用例

1. abcdefghijklmnopqrstuvwxyz 0-9

2.ABCDEFGHIJKLMNOPQRSTUVWXYZ 0-9符号也



-Ve testcases





1. Gernmany单词

2.泰卢固语单词

3. TAMIL单词

4.英语单词以外



是否可以像脚本语言一样使用java脚本,j查询。



谢谢

Sandeep Miriyala

解决方案

嗨那里



从我的观点来看,你必须用asciicode或Unicode检查每个字符



Unicode是最佳解决方案。





谢谢

abhishek

goletarabhishek8@live.com

Hi Miriyala,



试试这个正则表达式 ^ [\\\000000-\\\ 0000] +






测试输入1:

asdfdf adfkjadl34023 2342 ^ *&(*)(_)_)(_)(*& @#@ *#)KJHkjhkj2h3k4j23k4jl23kjl ljldfkjalkjfw098230940239 984379234283 - 确定

经过测试的输入2:

adfasdf தமிழ்மொழிafasdfdزبان_تامیلیadfads - 失败



您可以在其他 [ ^ ]。



希望这会对你有所帮助。



问候,

RK

Hai Code project Team,


I have doubt in asp.net.My present web application Prompt the user in user enter the text other than English language in asp:textbox.


My Requirement is as follows
1.prompt the user in user enter the other than English language in the asp. text box.
Ex: asp:textbox user can enter only English letters like a-z A-Z other than this words like language like Germany, Spanish ,Telugu , Tamil ,Hindi etc.
If in case enter other than English word prompt the user PLEASE enter the english words only. If it is possible please help.

+ve test cases
1. abcdefghijklmnopqrstuvwxyz 0-9
2.ABCDEFGHIJKLMNOPQRSTUVWXYZ 0-9 symbols also

-Ve testcases


1. Gernmany words
2. Telugu words
3. TAMIL WORDS
4. other than english words

Is it possible in Script language like java script , j query.

Thanks
Sandeep Miriyala

解决方案

hi there

From my point of view you have to check each and every characters with asciicode or Unicode

Unicode is best solution.


thanks
abhishek
goletarabhishek8@live.com


Hi Miriyala,

Try this regular expression ^[\u0000-\u0080]+




Tested input 1:
asdfdf adfkjadl34023 2342^*&(*)(_)_)(_) (*&@#@*#)KJHkjhkj2h3k4j23k4jl23kjl ljldfkjalkjfw098230940239 984379234283 - Ok
Tested input 2:
adfasdf தமிழ் மொழி afasdfd زبان_تامیلی adfads - Failed

You can test your own input in here[^].

Hope this helps you a bit.

Regards,
RK


这篇关于在asp.textbox中限制除英语之外的其他语言的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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