How come my button refuses to do a postback in my super small learning ASP.Net MVC application?
~/Blog/Post.aspx
<h2>Post</h2>
<fieldset>
<legend>Blog message</legend>
<%using (Html.BeginForm())
{ %>
<p>
<label for="EntryTitle">Title:</label><br />
<%= Html.TextBox("EntryTitle") %>
</p>
<p>
<label for="EntryMessage">Message:</label><br />
<%= Html.TextArea("EntryMessage") %>
</p>
<p>
<input type="button" value="Post!" />
</p>
<%} %>
</fieldset>
~/Controllers/BlogController.cs
[AcceptVerbs(HttpVerbs.Post)]
public ActionResult Post(FormCollection collection)
{
return View();
}
I don't get it, what am I missing? :o