Why is there no @Html.Button in IntelliSense in ASP.NET MVC 3?
I see references out there for @Html.Button(), but when I type that, IntelliSense doesn't find such a helper... there's dropdownlist, hidden, editors, et cetera, but no button!
There is no button helper as of mvc preview 3 (not mvc3)
it was mentioned a bunch in the past for example:
http://blog.wekeroad.com/blog/aspnet-mvc-preview-using-the-mvc-ui-helpers/
however rolling your own is trivial - essentially just create a new Html.ButtonFor and copy the source code from Html.LabelFor and change the output to create an <input type="button"> tag.
@Html.ActionLink
(
linkText: " Remove",
actionName: "Index",
routeValues: null, // or to pass some value -> routeValues: new { id = 1 },
htmlAttributes: new { @class = "btn btn-success btn-sm glyphicon glyphicon-remove" }
)
This will generate a link that looks like a button.