r m*_*r m 1 html-helper asp.net-mvc-views razor
如何在 ActionLink 中包含 html 实体。例如下面的情况»。
<p>@Html.ActionLink("Link Text »", "Index", new { }, new { @class = "btn btn-warning", @role = "button" })</p>
Run Code Online (Sandbox Code Playgroud)
小智 5
使用 Url.Action 代替
<p><a href=@Url.Action("Index") role="button"><span class="btn btn-warning">Link Text »</span></a></p>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
473 次 |
| 最近记录: |