Hiya!
I have setup a custom route as defined in my global.asax:
routes.MapRoute(
"Search", "{controller}/{action}/{type}/{searchterm}",
new { controller = "Search", action = "Results", type = "", searchterm = "" }
);
Now all I want to do it in a controller when data is passed via POST basically go in the format:
http://localhost/Search/Results/2/RG12%201JD
Instead what happens is:
http://localhost/Search/Results?type=1&searchterm=RG12%201JD
What am I doing wrong, the offending code is:
return RedirectToAction("Results",new {type = "1", searchterm = "RG12%201JD" });
Any help would be greatly appreciated!
Thanks
Jonathan