我有这段代码:
string tag = "<td> <a href="+ path + ">" + "<span class=glyphicon glyphicon-trash" + ">" + "</span>" + "</a>" + "</td>";
}
@Html.Raw(tag)
当我尝试使用glyphicon图标时,没有任何内容出现。我是否缺少在此实例中使用span类的任何语法?
答案 0 :(得分:1)
据我所知,您还需要将类值和href值包装在引号中。:
string tag = "<td> <a href='" + path + "'>" + "<span class='glyphicon glyphicon-trash'" + ">" + "</span>" + "</a>" + "</td>";