If you have looked at the Ajax.BeginForm() method on ASP.NET MVC Beta 1 you will notice there is no way to specify input parameters to your action as you could do with the lambda extension method Html.BeginForm with Futures.
This is how I got around it:
[sourcecode language='html']
…
My action method accepting "typeId":
[AcceptVerbs(HttpVerbs.Post)]
public ActionResult Add(int? typeId, [Bind(Prefix = "Fields", Include = Name,Description")] Field field)
{ ....... }
So by setting a Hidden form field with your parameter, this passes successfully and is populated as "typeId" within the Add action method.
Post a Comment