如何使用<a>
标记替换MVC3网格列 ActionLink ?
grid.Column(format: (item) => Html.ActionLink("Delete", "Delete", new { id = item.ID }, new { @class = "delete-button" } ), style: "column-action")
答案 0 :(得分:1)
我假设签名将允许IHtmlString。未经测试。
grid.Column(
format: (item) => Html.Raw("<a href='/delete/"
+ item.ID
+ "' class='delete-button'>Delete</a>"),
style: "column-action"
);