如何将此网页中的操作链接更改为图像? ps:我希望所有图像都出现在同一列
中@{
var grid = new WebGrid(Model, canPage:true ,canSort:true, rowsPerPage :6);
grid.Pager(WebGridPagerModes.NextPrevious);
@grid.GetHtml(tableStyle: "webGrid", htmlAttributes: new { id = "datatable" },
headerStyle: "Header",
alternatingRowStyle: "alt",
columns: grid.Columns(grid.Column(header: "", format: (item) =>
new HtmlString(
Html.ActionLink("Détails", "Details", new { id = item.id_client }).ToString() +
Html.ActionLink("Modifier", "Edit", new { id = item.id_client }).ToString() +
Html.ActionLink("Supprimer", "Delete", new { id = item.id_client }).ToString()
), style: "actions"),
grid.Column("Nom"),
grid.Column("Prenom", "Prénom"),
grid.Column("Email")));
}
答案 0 :(得分:1)
一种方法是为超链接添加css以获得像这样的背景图像
示例:强>
a.bgImg
{
background: url(../Images/background.gif)
}