Question
Starting from ASP.NET MVC Preview 3, HTML.Button ( and other related HTML controls) are no longer supported.
The question is, what is the equivalent for them? I've an app that was built using Preview 2, now I have to make it compatible with the latest CTP releases.
Solution 2
I figured it out. It goes something like this:
<form method="post" action="<%= Html.AttributeEncode(Url.Action("CastUpVote")) %>">
<input type="submit" value="<%=ViewData.Model.UpVotes%> up votes" />
</form>
Thanks everyone for your help!
OTHER TIPS
Just write <input type="button" ... />
into your html. There's nothing special at all with the html controls.
Several of the extension methods got moved to Microsoft.Web.Mvc, which is the MVC Futures DLL. You might want to look there for things that have gone missing.
<asp:Button>
is the ASP.NET equivalent to the HTML.Button. It will by default generate an <input type="button">
. (This is the System.Web.UI.WebControls.Button class)