我这里有个html页面,里面是一个表格,表格里面有汉字和textbox,现在要将这个页面导入word中去,我实现了这个功能,但是导入后,在word中仍然显示textbox,怎么才能把这个textbox去掉,而用户在textbox中填写的数据仍然显示在word的表格中。导入代码如下:
private void Export(string FileType,string FileName)
{
Response.Charset = "GB2312";
Response.ContentEncoding = System.Text.Encoding.GetEncoding("GB2312");
Response.AppendHeader("Content-Disposition", "attachment;filename=" + HttpUtility.UrlEncode(FileName, Encoding.UTF8).ToString());
Response.ContentType = FileType;
this.EnableViewState = false;
StringWriter tw = new StringWriter();
HtmlTextWriter hw = new HtmlTextWriter(tw);
form1.RenderControl(hw);
//GridView1.RenderControl(hw);
Response.Write(tw.ToString());
Response.End();
}
protected void Button1_Click(object sender, EventArgs e)
{
Button1.Visible = false;
Button2.Visible = false;
Export("application/ms-word", "公文呈办单.doc");
}
望高手出手相救!小弟不胜感激!