asp.net注册用户通过email邮箱验证的实现方式
public void SendSMTPEMail(string strSmtpServer, string strfrom, string strfromPass, string strto, string strSubject, string strBody)
{
System.Net.Mail.SmtpClient client = new SmtpClient(strSmtpServer);
client.UseDefaultCredentials = false;
client.Credentials = new System.Net.NetworkCredential(strfrom, strfromPass);
client.DeliveryMethod = SmtpDeliveryMethod.Network;
System.Net.Mail.MailMessage message = new MailMessage(strfrom, strto, strSubject, strBody);
message.BodyEncoding = System.Text.Encoding.UTF8;
message.IsBodyHtml = true;
client.Send(message);
}
第一个参数如果是163邮箱就写smtp.163.com
第二个参数发件人的帐号
第三个参数发件人密码
第四个参数收件人帐号
第五个参数主题
第六个参数内容.
相关文档:
Mysql的connector/net5.0下载地址:
http://dev.mysql.com/get/Downloads/Connector-Net/mysql-connector-net-5.0.6.zip/from/pick
安装好以后,
点属性,然后点查找目标,点向上一层目录,找到Binaries\.NET 2.0,然后将这个文件复制到你的工程目录下,一般这样的DLL文件会保存到bin目录下.
在代码页里输入using Mysql.Da ......
//连接数据库
string myStr = CODE.DbHelperSQL.connectionString;
SqlConnection myConn = new SqlConnection(myStr);
myConn.Open();
&nbs ......
In the last post I showed how to use the ASP.NET 3.5 Routing Engine
for URLRewriting purposes. I want to go further in this post by adding
the ability to add variables into a route path and forward and append
query string variables to the destination Web Form request.
A route can contain one or ......
1、界面代码:
<asp:GridView ID="gridTemplateDetailList" runat="server"
AutoGenerateColumns="False"
&nbs ......