I have a route that looks like this:
new { controller = "ControllerName", action = "PhotoGallery", slug = "photo-gallery", filtertype = UrlParameter.Optional, filtervalue = UrlParameter.Optional, sku = UrlParameter.Optional}
and I have a form that looks like this:
<%using(Html.BeginForm("PhotoGallery", "ControllerName", FormMethod.Get)) {%>
<%:Html.Hidden("filtertype", "1")%>
<%:Html.DropDownList("filtervalue", ViewData["Designers"] as SelectList, "Photos by designer", new { onchange = "selectJump(this)" })%>
<%}%>
Right now when the form is submitted I get the form values appended to the url as query strings (?filtertype=1 etc) Is there a way to get this form to use routing to render the URL?
So the form would post a URL that looked like this:
www.site.com/photo-gallery/1/selectedvalue
and not like"
www.site.com/photo-gallery?filtertype=1&filtervalue=selectedvalue
Thanks!