Hi,
I'm having quite a bunch of problems trying to use the overloaded version of the Html.Form() helper.
I have a ProductController class, and a method AddProduct(int id) in it. When I access this method via a Html.ActionLink everything works fine, but when I try to use the form nothing happens - the method is not called. Here is the source code for my form, and immediately below that, the link which points to the same place, and it works fine.
1 <% using (Html.Form("Product", "AddProduct", FormMethod.Get))
2 { %>
3 <%=Html.Hidden("id", ViewData["categoryID"].ToString(), null) %>
4 <%=Html.SubmitButton("button", ViewData["headerString"].ToString())%>
5 <%} %>
6 <%=Html.ActionLink( ViewData["headerString"].ToString(), "AddProduct", new { id = ViewData["categoryID"].ToString() } )%>
This is what the interface for the AddProduct() method looks like:
1 [AcceptVerbs("GET"), ActionName("AddProduct")]
2 public ActionResult AddProduct(int id)