title: MVC 3 Web Grid Image
body: <p>I have a web grid that I want to display an image instead of the word "delete" </p>
  
  <p>instead of this "Html.ActionLink("Delete"," I want to put an image </p>
  
  <p>how can I do it? </p>
  
  <p>this is my code: </p>
  
  <pre><code>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) =&gt; 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) =&gt; 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: @&lt;text&gt;&lt;img src="@Url.Content("~/Uploads/Parts/" + item.PartImageName)" alt="" style="width:100px;height:50px;" /&gt;&lt;/text&gt;),
                      grid.Column(header: "Files Name", format: @&lt;text&gt;@((item.PartImageName as String))&lt;/text&gt;)))
  </code></pre>