我正在開發一個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