2

QQ: Is it possible to display an image via @Html.ActionLink helper instead of a link but be able to pass in object htmlattributes such as item id's?

@Html.ActionLink("Edit", "Edit", new { id=item.TheId })
Mariah
  • 727
  • 5
  • 12
  • 25

1 Answers1

1

Short answer is NO, ActionLink HTML helper does not support this by default. You can implement your own HTML helper that would do this for you.

  • 2
    thanks....I had to hack temp it with: – Mariah Oct 22 '11 at 18:59
  • Yep, that works too :) See whether you can come with something on the lines of @Html.ImageActionLink("Title", "Action", "Controller", "ImagePath", new { id = Model.Id }); –  Oct 22 '11 at 20:47