如何检查文本框中的电子邮件ID是否存在于asp.net c# [英] How to check email id in textbox exist or not in asp.net c#

查看:97
本文介绍了如何检查文本框中的电子邮件ID是否存在于asp.net c#的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何检查文本框中的电子邮件ID是否存在于asp.net c#

解决方案

检查电子邮件是否有效:



  string  email = txtemail.Text; 
正则表达式正则表达式= 正则表达式( @ ^([\w\.\ - ] +)@([\w\ - ] +)(。(\(\w){2,3})+)

);
匹配匹配= regex.Match(电子邮件);
if (match.Success)
Response.Write(email + < span class =code-string> is corrct);
else
Response.Write(email + is incorrct);





要检查电子邮件是否确实存在,您必须发送一个发送电子邮件并检查它是否会反弹。


How to check email id in textbox exist or not in asp.net c#

解决方案

To check for email valid:

string email = txtemail.Text;
Regex regex = new Regex(@"^([\w\.\-]+)@([\w\-]+)((\.(\w){2,3})+)


"); Match match = regex.Match(email); if (match.Success) Response.Write(email + " is corrct"); else Response.Write(email + " is incorrct");



To check if the email actually exists, you would have to send an email and check if it bounces back.


这篇关于如何检查文本框中的电子邮件ID是否存在于asp.net c#的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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