Reputation: 1651
I have this code:
string tag = "<td> <a href="+ path + ">" + "<span class=glyphicon glyphicon-trash" + ">" + "</span>" + "</a>" + "</td>";
}
@Html.Raw(tag)
Nothing appears when I tried to use the glyphicon icon. Am i missing any syntax to use the span class in this instance?
Upvotes: 1
Views: 1040
Reputation: 3454
You'll need to wrap the class value and href value in quotes too, as far as I know.:
string tag = "<td> <a href='" + path + "'>" + "<span class='glyphicon glyphicon-trash'" + ">" + "</span>" + "</a>" + "</td>";
Upvotes: 3