我知道!
我就是想绕过ie的设置!让它下载
而且我们知道用右键另存为可以下载这些文件
所以我想完全可以用.net来控制做到这些!

解决方案 »

  1.   

    感谢您使用微软产品。
     
    建议您加入下面的HTTP Header:Response.AddHeader("Content-Disposition", "attachment");同时,您可以参阅下面的帖子:http://expert.csdn.net/expert/buildtopic.asp?id=1030659http://expert.csdn.net/expert/buildtopic.asp?id=1038335http://expert.csdn.net/expert/buildtopic.asp?id=1067863希望对您有所帮助。
     
    -微软全球技术中心  -zgh
     
    本贴子以“现状”提供且没有任何担保,同时也没有授予任何权利。具体事项可参见使用条款(http://support.microsoft.com/directory/worldwide/zh-cn/community/terms_chs.asp)。
    为了为您创建更好的讨论环境,请参加我们的用户满意度调查(http://support.microsoft.com/directory/worldwide/zh-cn/community/survey.asp?key=(S,49854782))。
      

  2.   

    好像不行!
    按照你的说法:
    Response.AddHeader("Content-Disposition", "attachment");
    Response.Redirect("test.xls");还是用ie打开了这个文件,不是下载,那种另存为的形式!
      

  3.   

    谢谢!搞定了!
    Response.AddHeader("Content-Disposition", "attachment;filename=test.xls");
    Response.ContentType="Application/vnd.ms-excel";
    这样!