Ad

Search This Blog

Friday, May 29, 2015

How to change @Html.DisplayFor() to @Html.ActionLink() in MVC4


Example :    

@Html.DisplayFor(modelItem => item.MainContact)

Changes to below.

  @Html.ActionLink(item.MainContact, "ActionName", "ControllerName", new { id = item.ID }, null)


No comments:

Post a Comment