I have the following route:
routes.MapRoute("Archive", "archive/{year}", new
{
controller = "Archive",
action = "Results"
}
);
I have the route working correctly, but I would like my url to show as follows:
http://mysite.com/archive/2008
when I click on the search button instead of just:
http://mysite.com/archive
I DON'T want to do this by creating an action link to that url, I want the submit button to do it.
EDIT:
More info. On my home page, I have a textbox that, when the submit button is clicked, passes the year value typed in the textbox to the Action method Results in my Archive controller that takes one parameter, year. I am getting the correct value in the method right now, I just want the year displayed in the url as well. If I manually type in the year in the url like above, it works just as I expect as well.
THANKS!