本机测试没问题.到了服务器上发送报404错误.我的地址写成~/Index.aspx应该没问题啊.难道要物理路径?
//发送邮件
if (mm != null)
{
client.Send(mm);
this.Page.ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('发送成功!感谢您的支持')</script>");
Response.Redirect("~/Index.aspx");
}
else
{
return;
}
发送完成后跳入主页.为什么总是404错误
//发送邮件
if (mm != null)
{
client.Send(mm);
this.Page.ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('发送成功!感谢您的支持')</script>");
Response.Redirect("~/Index.aspx");
}
else
{
return;
}
发送完成后跳入主页.为什么总是404错误
Page.ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('发送成功!感谢您的支持');window.location.href='~/Index.aspx'</script>");
这样都获取不到.
{
client.Send(mm);
this.Page.ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('发送成功!感谢您的支持')</script>");
Response.Redirect("Index.aspx");
}
else
{
return;
}