I need to add a dynamic routevalue in html.beginform, something like this
Html.BeginForm("action", "controller", new {
somethingID = "some js function or jquery that get the value from a textbox"
}))
I know mvc is already passing the paramenter to my method when the form submit, but I need the url to include the parameter in the mvc url format, ie mydomain.com/controller/action/somethingID
. Eveything is working right now, but because I have another $.ajax()
call that pass in the url, something like "../someMethod"
, the $.ajax()
dont work because the current url is (mydomain.com/controller/action)
not (mydomain.com/controller/action/somethingID)
.