检查电子邮件ID [英] Checking Email ID

查看:108
本文介绍了检查电子邮件ID的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人可以帮助我吗?

解决方案



试试这个:

http://www.codeproject.com/KB/recipes/EmailRegexValidator.aspx [ ^ ]


请尝试下面的表达式,用于使用Javascript进行检查.

^ [\ w \.=-] + @ [\ w \ .-] + \.[\ w] {2,3}




如果使用的是ASP.Net,则可以使用正则表达式验证器

 <   asp:RegularExpressionValidator     ID   ="   ="span>    runat   =" 服务器"  ControlToValidate    txtEmailAddress"  CssClass   ="               ValidationExpression   ="   ValidationGroup   ="  宽度   168px " 
   显示  =" 动态" "><  /asp:RegularExpressionValidator  >  


Can anyone help me?
How can I check mail id in my textbox whether it is correct or not?

解决方案

Hi,

try this:

http://www.codeproject.com/KB/recipes/EmailRegexValidator.aspx[^]


Please try the below expression for checking with Javascript.

^[\w\.=-]+@[\w\.-]+\.[\w]{2,3}




If you are using ASP.Net you can use the Regular expression validator

<asp:RegularExpressionValidator ID="valEmailAddress" runat="server" ControlToValidate="txtEmailAddress" CssClass="validator"      ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" ValidationGroup="Next" Width="168px"

 Display="Dynamic">Incorrect e-mail address</asp:RegularExpressionValidator>


这篇关于检查电子邮件ID的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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