Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何将字符串 linkText 写为 null?
<i class="icon-pencil" >@Html.ActionLink( null,"edit", new { id = item.content_id }) </i>
我感觉你正在使用 Twitter Bootstrap(因为<i>标签上有“icon-pencil”类)。
<i>
在这种情况下,最好将标签放在标签<i>内,<a>而不是相反:
<a>
<a href="@Url.Action("edit", new { id = item.content_id })"><i class="icon-pencil"></i></a>
将 null 替换为:
string.empty