In ASP.NET MVC I’m using the HTML helper
Html.BeginForm("ActionName", "Controller", FormMethod.Post);
But I need to post to: /controller/action/23434
How do I pass in the ID?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Matt’s should work fine. If you are still passing in
FormMethod.Post, though, you need to do it like this:Reversing the third and fourth parameters will result in the
Idbeing treated as an attribute instead of a route value.