I need to create <a> tag via WebGrid but it is not visible. Although it is under the output html.
How to fix it and make it visible?
HTML code:
@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: "")
)
)
}
and HTML output:
<tr class="row">
<td><a target='_blank' class='' href='http://localhost:51381/Receipt/2bc1c02d-44a3-4a53-9255-98aa4a41cd53'></a></td>
</tr>
So <a> is invisible. 🙁
Any clue?
it won’t be visible it doesn’t have a particular style (as @Travis said), and also your
<a>is empty, I mean there is nothing between the opening<a>and the closing</a>, that’s why don’t see anything, try to put some text inside you’ll probably see it