Rav*_*eja 2 asp.net asp.net-mvc twitter-bootstrap glyphicons twitter-bootstrap-3
我想替换
X用glyphicon-trash.
我X用作linktext.Which用于删除项目.如何用glyphicon替换.
这是我的代码
@Html.ActionLink(
"X",
"Delete",
"Grocery",
new { GroceryUsageID = item.GroceryUsageID, GroceryId = item.GroceryID },
new { @onclick = "return confirm('Are you sure you want to delete this Grocery');"})
Run Code Online (Sandbox Code Playgroud)
你可以像下面这样做.只需添加@class = "glyphicon glyphicon-trash"在htmlAttributes参数和替换X用space.
@Html.ActionLink(
" ",
"Delete",
"Grocery",
new { GroceryUsageID = item.GroceryUsageID, GroceryId = item.GroceryID },
new { @onclick = "return confirm('Are you sure you want to delete this Grocery');",
@class = "glyphicon glyphicon-trash" })
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
9244 次 |
| 最近记录: |