使用asp.net验证域中的电子邮件地址 [英] validate email address in domain using asp.net

查看:71
本文介绍了使用asp.net验证域中的电子邮件地址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

PLZ帮我验证域名中的电子邮件地址...

例如我想查看xyz@yahoo.com存在与否的电子邮件地址......

for gmail,rediff,hotmail等等....

plz help me to validate email address in domain ...
for example i want to check the email address like xyz@yahoo.com exists or not...
for gmail,rediff,hotmail etc etc....

推荐答案

检查此问题的最佳方法是在代码中发送确认电子邮件。您要求用户在文本框中输入代码,然后您可以检查发送的代码是否与输入的代码相同。

发送电子邮件:

< a href =http://www.codeproject.com/Tips/163829/Sending-an-Email-in-C-with-or-without-attachments>使用或不使用附件在C#中发送电子邮件:通用例程。 [ ^ ]

VB.NET提示:

使用或不使用附件在C#中发送电子邮件:通用例程。 [ ^ ]
The best way to check this, is to send a confirmation email within a code. You ask the user to enter the code in a text box and then you can check whether the sent code is equal to the entered code.
To send an email:
Sending an Email in C# with or without attachments: generic routine.[^]
VB.NET tip:
Sending an Email in C# with or without attachments: generic routine.[^]






试试这个



< asp:regularexpressionvalidator id =regexEmailValidrunat =服务器validationexpress ion =\ w +([ - +。] \ w +)* @ \ w +([ - 。] \ w +)* \.\ w +([ - 。] \ w +)*controltovalidate = tbEmailerrormessage =无效的电子邮件格式xmlns:asp =#unknown>
Hi,

Try this

<asp:regularexpressionvalidator id="regexEmailValid" runat="server" validationexpression="\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" controltovalidate="tbEmail" errormessage="Invalid Email Format" xmlns:asp="#unknown">


这篇关于使用asp.net验证域中的电子邮件地址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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