【发布时间】:2011-04-21 11:46:40
【问题描述】:
Asp.Net 应用程序 1 - 网页包含一个超链接,例如 ShowReport
ASP.Net应用2-网页下载.aspx
在应用程序 1 中,当单击 ShowReport 链接时,我打开页面 Download.aspx(托管在单独的网站中)以向用户显示保存/下载对话框:
ShowReport.href = [http://localhost:19515/Download.aspx]
在 app2 - Download.aspx 中,我有类似的内容:
Response.ClearHeaders();
Response.ClearContent();
Response.Clear();
Response.ContentType = contentType.GetFriendlyName();
Response.AddHeader("Content-Disposition", string.Format("attachment; filename={0}", file.Name));
Response.AddHeader("Content-Length", file.Length.ToString());
Response.TransmitFile(filePath);
但是在 Safari 中运行应用程序时,当单击 ShowReport 链接时,我收到一条警告说
'你确定要离开这个页面吗?您有未保存的更改。单击“确定”离开或单击“取消”留下'
谁能指导我如何摆脱这个警报。
谢谢!
【问题讨论】: