HTML button calling an MVC Controller and Action method

No need to use a form at all unless you want to post to the action. An input button (not submit) will do the trick.

  <input type="button"
         value="Go Somewhere Else"
         onclick="location.href="https://stackoverflow.com/questions/2503923/<%: Url.Action("Action", "Controller") %>"" />

Leave a Comment