我的文件路径是这样的
http://192.168.0.1/yw/aaa.doc
Response.Redirect(“http://192.168.0.1/yw/aaa.doc
”);(链接也可以)
直接打开文件,,而不弹出保存或者下载提示 
不知有什么好的方法...

解决方案 »

  1.   

    如果你只是想让用户看到这个文件 
    可以用asp.net读取
    http://hi.baidu.com/fangchj2002/blog/item/0d385aef749f92feb3fb95cc.html
      

  2.   

    http://hi.baidu.com/i_this/blog/item/a06ef8b0927c94530823024e.html
      

  3.   

    谢谢楼上的回复,但我感觉还是不符合我的要求,我要链接的文件不单只.doc文件,可能还有.xls、。sif格式等,如果不做处理它会弹出是否 保存的框,我现在要实现的效果就是直接打开,而不弹出保存框
      

  4.   

    Response.Write("<script>window.open('" +Server.MapPath(FileName) + "')</script>");
      

  5.   

    你要是直接去读取的话肯定得弹出那个框!
    解决方法:
    你可以在做一个页面,专门负责显示你的文件内容!
    在显示也中放入一个<iframe src="./11111.xls"></iframe>
     
    详细看看:http://blog.csdn.net/lzy_1515/archive/2009/03/02/3949559.aspx
      

  6.   

    string Pa=page.Server.MapPath(@"../a/"+File+"");
    page.Response.AppendHeader("Content-Disposition","attachment;filename="+File+"");
    page.Response.WriteFile(Pa);
    page.Response.End();
    或用window.open打开