【发布时间】:2017-06-09 01:52:32
【问题描述】:
我有下面发布的 html 代码。我想将该 Delete and Edit Button 类应用到 HTML Action Link。
这是我的代码。
@Html.ActionLink("Edit", "EditUser", new { UserName = item.UserName }) |
@if ((item.UserName.ToLower() != this.User.Identity.Name.ToLower()))
{
@Html.ActionLink("Delete", "DeleteUser", new { UserName = item.UserName },
new { onclick = "return confirm('Are you sure you wish to delete this user?');" })
}
这个用于删除和编辑的 HTML 代码:
<a href="#" class="btn btn-info btn-xs black">
<i class="fa fa-trash-o"></i> Delete
</a>
<a href="#" class="btn btn-success btn-xs purple">
<i class="fa fa-edit"></i> Edit
</a>
我怎样才能让它工作?
我们将不胜感激。
【问题讨论】:
标签: html twitter-bootstrap razor model-view-controller