【发布时间】:2010-12-24 14:23:58
【问题描述】:
我在将 html 页面导出到 Word 时遇到问题,我无法摆脱表格元素上的边框。
<table cellspacing="0" cellpadding="0">
<tr>
<td class="title">Analyst</td>
<td>
<asp:Label ID="lblAnalyst" runat="server" CssClass="data" />
</td>
<td class="title">Borrower</td>
<td>
<asp:Label ID="lblBorrower" runat="server" />
</td>
</tr>
</table>
我将内容类型设置为 Word
Response.ContentType = "application/vnd.ms-word";
Response.AddHeader("content-disposition", String.Concat("attachment;filename=", fileName));
无论我做什么,我仍然会得到整个表格和每个单元格周围的边框。
我尝试将表格上的边框属性设置为 0,使用内联样式并在部分中包含样式,但没有任何效果。我什至一起尝试了所有这三个。
有什么想法吗?这是为 Word 2003 设计的。
【问题讨论】:
标签: html asp.net ms-word html-table