「削除」という単語の代わりに画像を表示したいWebグリッドがあります
この「Html.ActionLink( "Delete"」の代わりに、画像を入れたい
どうすればいいですか?
これは私のコードです:
enter code here
@{ var grid = new WebGrid(source: Model.PartImageSearchResult, rowsPerPage: 2, canPage: true, defaultSort:
"PartImageSearchResult.PartImageName", canSort: true, ajaxUpdateContainerId: "ImagesListGrid");}
@grid.GetHtml(
mode: WebGridPagerModes.All,
numericLinksCount: 5,
firstText: "First",
lastText: "Last",
previousText: "Previous",
nextText: "Next",
tableStyle: "webgrid",
headerStyle: "webgrid-header",
rowStyle: "webgrid-row-style",
footerStyle: "webgrid-footer",
alternatingRowStyle: "webgrid-selected-row",
htmlAttributes: new { id = "PartFilesUploadID" },
columns: grid.Columns(
//grid.Column(style: "PartImagesDelete", format: (item) => Html.ImageLink("~/Content/images/btn_delete_sm.png", "DeletePartImages", new { id = item.PartFilesUploadID }, new { onclick = "return confirm('Are you sure you wish to delete this article?');" })),
grid.Column(style: "PartImagesDelete", format: (item) => Html.ActionLink("Delete", "DeletePartImages", new { id = item.PartFilesUploadID }, new { onclick = "return confirm('Are you sure you wish to delete this article?');" })),
grid.Column(header: "Images", style: "PartImages", format: @<text><img src="@Url.Content("~/Uploads/Parts/" + item.PartImageName)" alt="" style="width:100px;height:50px;" /></text>),
grid.Column(header: "Files Name", format: @<text>@((item.PartImageName as String))</text>)))