网页中打开word文档

    技术2022-05-11  30

    private void Button1_Click(object sender, System.EventArgs e)   {    string id = Request["file_id"].ToString();    SZPOA.Biz.PublicPOA myclass = new SZPOA.Biz.PublicPOA();    Response.AddHeader( "content-type","application/msword") ;    Response.AddHeader(  "Content-Disposition","attachment;filename=temp.doc");    if (myclass.GetFile_nolr(id) != null)    {     Response.BinaryWrite(myclass.GetFile_nolr(id));    }    else    {     SiteClass.MessageBox.ShowOther(this,"对不起,未找到文件内容!");    }   } 

    最新回复(0)