I am using ASP.NET MVC 5 and in my view, I am trying to add "Edit | Delete" functionality within a table. I am getting a hyperlink for my edit, but I don't get any hyperlink for delete.
Here is my markup in the view:
<td id="pagefunc">
@Html.ActionLink("Edit", "Edit", new { id = item.POC_Id }) |
<a data-record-id="@item.POC_Id" class="js-delete delete">Delete</a>
</td>
Here is the screen shot of the section, on which edit gives me a hyperlink but delete does not:
I am not sure what I am doing wrong and why I am not getting a hyperlink on hovering over the delete link
Try the following:
<td id="pagefunc">
@Html.ActionLink("Edit", "Edit", new { id = item.POC_Id }) |
<a href="@Url.Action("Delete", "Delete", new { id = item.POC_Id })" class="js-delete delete">
<span>Delete</span>
</a>
</td>