DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

Calling A MVC Controller And Action Method Using HTMLButton

12.20.2011
| 7108 views |
  • submit to reddit
        If we want to have an image that links to an action? You might think that you could combine the ActionLink and Image and Button helpers like this:

<input type="button" title="Delete" value="D" onclick="location.href='@Url.Action("Delete", "movies", new { id = item.ID })'" />

<a href="http://www.java-forums.org/java-software/"><strong>Java Software</strong></a>