a.aspx gridview的一链接列,用来下载文件。代码
<ItemTemplate>                        
                        <asp:HyperLink ID="HyperLink1" Text='<%# Eval("FILENAME") %>' NavigateUrl='<%# "~/PAGE1_DL.aspx?type=1&id="+ Eval("ID")%>' runat="server"></asp:HyperLink>
                    </ItemTemplate>
这页中还有一个返回按钮 代码 
 <input id="Button2" style="width: 80px" type="button"
         onclick="location.href='../PAT/sure.aspx?CLASSIFY_ID=<%= Request.QueryString["ClassID"] %>';return false;"
         value="返回" />下载页面 PAGE1_DL.aspx
html里面就这一句话  <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PAGE1_DL.aspx.cs" Inherits="Page1.PAGE1_DL" %>
cs里面  
Page_load
{
从数据库中取得文件的绝对路径,
filepath =c://page1/file/a.pdf;
然后调用
 DownLoad(filepath);
}
DownLoad方法是这样的
 private void DownLoad(string filepath)
        {
            if (File.Exists(filepath))
            {
                FileInfo fi = new FileInfo(filepath);
                Response.Clear();
                Response.ClearHeaders();
                Response.Buffer = false;
                Response.ContentType = "application/pdf";
                Response.AddHeader("Content-Disposition", "attachment;filename=" + HttpUtility.UrlEncode(fi.Name, Context.Response.HeaderEncoding));
                Response.AddHeader("Content-Length", fi.Length.ToString());
                Response.TransmitFile(fi.FullName);
                Response.Flush();
                HttpContext.Current.ApplicationInstance.CompleteRequest();
            }
        }就这样的一个逻辑,现在问题  点文件名链接然后,下载文件并保存以后,这个时候点一下返回按钮没有反映,再点一次才回到前面的页面。这是什么的原因的。
请高手帮忙。不明白请不要回帖。谢谢