我正在开发一个mvc.net网络应用程序。我用一个webgrid来显示我的数据库中的数据。将链接添加到webgrid中
@{
var grid = new WebGrid(Model, canPage:true , rowsPerPage :6);
grid.Pager(WebGridPagerModes.NextPrevious);
@grid.GetHtml(tableStyle: "webGrid", htmlAttributes:
new {id="datatable" },headerStyle: "Header", alternatingRowStyle : "alt",
columns: grid.Columns(grid.Column("Nom"), grid.Column("Prenom"),
grid.Column("Email")));
}
我只想为每行添加3个操作链接。怎么做。这里是我的操作链接(我用图片代替文字)
<a href="@Url.Action("Details", new { id = item.id_client })">
<img src="~/Images/details.png" alt =""/></a>
<a href="@Url.Action("Edit", new { id = item.id_client })">
<img src="~/Images/modifier.png" alt =""/></a>
<a href="@Url.Action("Delete", new { id = item.id_client })">
<img src="~/Images/supprimer.png" alt =""/></a>
事实上,这些链接进行编辑,删除和显示有关每一行的细节。请帮助 – Kira 2012-08-02 09:58:54
你只想要图像,甚至文字很酷? – Yasser 2012-08-02 10:04:13
事实上,我已经找到了一种使用文本的方式,但我想要图像^^无论如何,谢谢你,yasser – Kira 2012-08-02 10:07:09