It depends on what you mean by the button. If this is a link:
<%= Html.ActionLink("some text", "actionName", "controllerName") %>
For publication, you can use the form:
<% using(Html.BeginForm("actionName", "controllerName")) { %> <input type="submit" value="Some text" /> <% } %>
And finally, if you have a button:
<input type="button" value="Some text" onclick="window.location.href='<%= Url.Action("actionName", "controllerName") %>';" />
Darin Dimitrov Jul 02 '10 at 19:30 2010-07-02 19:30
source share