发送电子邮件后,Response.Redirect()未执行

时间:2015-12-02 06:12:58

标签: asp.net sendmail response.redirect

发送电子邮件后,

重定向页面。

Msg.IsBodyHtml = true;    
Msg.CC.Add(dig);
Msg.CC.Add(sp);
Msg.CC.Add(dsp);
// your remote SMTP server IP.
SmtpClient smtp = new SmtpClient();
smtp.Host = ConfigurationManager.AppSettings["smtpServer"];
smtp.Port = Convert.ToInt32(ConfigurationManager.AppSettings["smtpPort"]);
smtp.EnableSsl = true;
smtp.Credentials = new System.Net.NetworkCredential(ConfigurationManager.AppSettings["smtpUser"], ConfigurationManager.AppSettings["smtpPass"]);
// smtp.EnableSsl = true;
smtp.Send(Msg);
Response.Redirect("AccusedProfile.aspx?AccusedId=" + idLbl.Text + "&Success=Y"); //This line is not executing.

如何在发送电子邮件后执行重定向?

0 个答案:

没有答案
相关问题