当前位置: 代码迷 >> Delphi >> 路径有关问题
  详细解决方案

路径有关问题

热度:7834   发布时间:2013-02-25 00:00:00.0
路径问题
上传附件到Email
本机测试没问题.到了服务器上发送报404错误.我的地址写成~/Index.aspx发送完了返回主页.难道要物理路径? 
//发送邮件
  if (mm != null)
  {
  client.Send(mm);
  this.Page.ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('发送成功!感谢您的支持')</script>");
  Response.Redirect("~/Index.aspx");
  }
  else
  {
  return;
  }


------解决方案--------------------------------------------------------
Response.Write("<script language=javascript>alert('发送成功!感谢您的支持');location='../Index.aspx';</script>");这样子就对了
------解决方案--------------------------------------------------------
探讨
Response.Write("<script language=javascript>alert('发送成功!感谢您的支持');location='../Index.aspx';</script>");这样子就对了
  相关解决方案