输出的代码:
//HttpContext.Current.Response.Clear();
//HttpContext.Current.Response.AddHeader("Content-disposition", "attachment;filename=" + strfilename);
//HttpContext.Current.Response.AddHeader("Content-Length",file.Length.ToString());
//HttpContext.Current.Response.ContentType="application/octet-stream";
//HttpContext.Current.Response.Filter.Close();
//HttpContext.Current.Response.WriteFile(file.FullName);
//HttpContext.Current.Response.End();
在弹出保存的对话框的时候,直接选择打开,就提示地址找不到的错误了。
文件应该是保存在IE的临时文件夹里面了。但是实际上是找不到content.IE5这个文件夹的。
但是奇怪的是,如果我开了一个word窗口,然后在点击输出doc文件的流就能打开。见鬼了,大家又遇到这个问题的吗?帮忙看看了。