一点按钮 直接弹出一个新页  然后里面打开word文件的内容已经保证客户端安装了相应word软件

解决方案 »

  1.   

    完全可以做得到
    如果你是doc档以文件存在服务器上 
    <a href = 服务器/档案.doc target = _blank>点这里弹出</a>
      

  2.   

    <a href = 服务器/档案.doc target = _blank>点这里弹出</a>
      

  3.   

    点击“打开”按钮后,服务器端响应:
    Response.Write( "<script language=javascript>window.open('WebForm2.aspx')</script>");WebForm2中:
    private void Page_Load(object sender, System.EventArgs e)
    {
    if(!Page.IsPostBack)
    {
    string filePath = Session["filePath"].ToString();
    System.IO.FileStream fs = System.IO.File.OpenRead( filePath );
    byte[] FileData = new byte[ fs.Length ];
    fs.Read( FileData, 0, (int)fs.Length );
    Session.Clear();
    Response.Clear();
    Response.AddHeader( "Content-Type", "application/vnd.ms-word" );
    Response.AddHeader("Content-Disposition", "inline;filename=" + filePath );
    Response.AddHeader("Content-Length", fs.Length.ToString() );
    Response.BinaryWrite( FileData );
    fs.Close();
    System.IO.File.Delete( filePath );
    }
    }
      

  4.   

    忘了说了,第一个页面点击button,事件响应要把文件路径放到session里
    this.Session["filePath"] = filePath;
      

  5.   

    楼上的用session干吗?直接通过地址栏文件名就可以了。注意要用urlcode编码
      

  6.   

    fangxinggood(JustACoder) 说的对
      

  7.   

    <a href = 服务器/档案.doc target = _blank>点这里弹出</a>
      

  8.   

    这个就行啊
     <a href = ****.doc target = _blank>fasdf</a>
      

  9.   

    直接的在<A >的href=""写地址就是了。
      

  10.   

    直接打开.doc的url,或者设置Response.ContentType为word/application,然后再输出word内容