.net如何下载URL的文件并直接打开不弹出保存 打开的提示框???
程序
string FileName = Url.Substring(Url.LastIndexOf("/") + 1);
System.Net.WebClient UrlFile = new System.Net.WebClient();
Stream r = UrlFile.OpenRead(Url);
this.Response.Clear();
Response.ClearHeaders();
Response.BufferOutput = false;
//Response.ContentType = "application/octet-stream";
Response.ContentType = "application/pdf";
Response.AppendHeader("Content-disposition", "attachment;filename=" + HttpUtility.UrlEncode(FileName, System.Text.Encoding.UTF8));
//Response.tr
//Response.AddHeader("Content-Length", longs.ToString());
int longs = 0;
这段代码可以下载我的URL指定的一个PDF文件 但是会弹出保存和打开的提示框 我现在想直接打开那个PDF的文件不要提示框怎么办?????
还有就是这段代码
System.Diagnostics.Process p = new System.Diagnostics.Process();
p.StartInfo.FileName = "C:\\Program Files\\Foxit Software\\Foxit Reader\\Foxit Reader.exe";
p.StartInfo.Arguments = "E:\\a.pdf";
p.Start();
这段代码可以调用Foxit Reader.exe打开E:\\a.pdf 但是我现在的PDF文件不是在本地上是一个URL的路径"http://192.168.0.6/Images/ECGDATA/ECG/a8888.pdf"; 怎么打开????求大仙帮忙解决