如何在HtmlTextWriter中阅读和执行更改

时间:2013-03-01 05:34:28

标签: asp.net htmltextwriter

在ASP.NET站点中,我正在渲染一个GridView控件,以便在excel文件中导出它的详细信息

Response.ContentType = "application/vnd.ms-excel"
Response.AppendHeader("Content-Type", "application/vnd.ms-excel")
Dim stringWrite As System.IO.StringWriter = New System.IO.StringWriter
Dim htmlWrite As System.Web.UI.HtmlTextWriter = New HtmlTextWriter(stringWrite)
gridviewObject.RenderControl(htmlWrite)
Response.Write(stringWrite.ToString())
Response.End()

现在,它正在渲染,但gridview使用很少的图像来美化数据。 在导出数据时,我不想在excel中显示图像。 所以我想找到标签,并希望用空字符串替换它。

有人能告诉我怎么做吗?

0 个答案:

没有答案
相关问题