I have a FormMethod.Get
that takes two parameters from a mostly read only form. These two parameters are the only query parameters needed to display all the other values on the read only form so they are text boxes (most of the values are DisplayFor()
or disabled). Normally I can navigate to my read only form by typing .../Home/Edit/S6/B043
. However, because this is a form submission it shows a URL like this .../Home/Edit?Location=S6&Facility=B043
. How do I get it to show my route of .../Home/Edit/S6/B043
when I submit the form to get the rest of the data? Or do I have to go back to my original plan of using javascript with window.location.href =
.
Thank you.
@using (@Html.BeginForm("Edit", "Home", routevalues, FormMethod.Get, new { id = "get-card" }))
{
// code here
}