【发布时间】:2013-01-13 17:19:06
【问题描述】:
我需要通过WebGrid 创建<a> 标签,但它不可见。虽然是在输出的html下。
如何修复它并使其可见?
HTML 代码:
@grid.GetHtml(
tableStyle: "grid",
headerStyle: "head",
alternatingRowStyle: "alt",
rowStyle: "row",
selectedRowStyle: "selected-row",
columns: grid.Columns(
grid.Column("ReceiptURL", "Receipt", format: (item) => @Html.Raw(string.Format("<a target='_blank' class='' href='{0}'></a>" ,@item.ReceiptURL)), style: "")
)
)
}
和 HTML 输出:
<tr class="row">
<td><a target='_blank' class='' href='http://localhost:51381/Receipt/2bc1c02d-44a3-4a53-9255-98aa4a41cd53'></a></td>
</tr>
所以<a> 是不可见的。 :(
有什么线索吗?
【问题讨论】:
标签: c# asp.net-mvc webgrid