i need to post url to be /controller/action/someID
not sure how to get someID in using the BeginForm helper.
html.beginform("controller", "action", formmethod.post)
i need to post url to be /controller/action/someID
not sure how to get someID in using the BeginForm helper.
html.beginform("controller", "action", formmethod.post)
I believe it will be:
Html.BeginForm("Controller","Action",new { someID = Model.SomeID }, FormMethod.Post);
...based on this overload from the FormExtensions in MVC.
Try this:
using (Html.BeginForm("controller", "action", new { id = 1234 }, FormMethod.Post))
That third parameter is routeValues.