如题啊,我的导出程序是这样写的
[code]
Response.Clear();
Response.Buffer = true;
Response.Charset = "GB2312";
Response.AppendHeader("Content-Disposition", "attachment;filename=out.doc");
Response.ContentType = "application/ms-word";
this.EnableViewState = false;
Response.Write(this.mainform.InnerHtml);
Response.End();
[/code]
[code]
Response.Clear();
Response.Buffer = true;
Response.Charset = "GB2312";
Response.AppendHeader("Content-Disposition", "attachment;filename=out.doc");
Response.ContentType = "application/ms-word";
this.EnableViewState = false;
Response.Write(this.mainform.InnerHtml);
Response.End();
[/code]
Response.Clear();
Response.Buffer = true;
Response.Charset = "GB2312";
Response.AppendHeader("Content-Disposition", "attachment;filename=out.doc");
Response.ContentType = "application/ms-word";
this.EnableViewState = false;
Response.Write(this.mainform.InnerHtml);
Response.End();
<html xmlns:v="urn:schemas-microsoft-com:vml"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:w="urn:schemas-microsoft-com:office:word"
xmlns:m="http://schemas.microsoft.com/office/2004/12/omml"
xmlns="http://www.w3.org/TR/REC-html40">
在head里加入这个:
<!--[if gte mso 9]><xml>
<w:WordDocument>
<w:View>Print</w:View>
</w:WordDocument>
</xml><![endif]-->
试试看行不行