“文件下载”窗口怎么能另开窗口?
点击“打开”如果是其它文件,会自动打开新窗口,但如果是htm文件,原来的页面就转到了新打开的文件,怎么才能另开窗口呢?
FileInfo DownloadFile = new FileInfo(FullFileName);
Response.Clear();
Response.ClearHeaders();
Response.Buffer = false;
Response.ContentType = "application/octet-stream ";
Response.AppendHeader( "Content-Disposition ", "attachment;filename= " + HttpUtility.UrlEncode(DownloadFile.FullName, System.Text.Encoding.UTF8));
Response.AppendHeader( "Content-Length ", DownloadFile.Length.ToString());
Response.WriteFile(DownloadFile.FullName);
Response.Flush();
Response.Close();
Response.End();
------解决方案--------------------DAY DAY UP