I am working on a web page that offers a form with a dropdown list to view data from a different year. The year is part of the URL routing that is configured. When the page loads, the URL can be something like: activitylog/department/year.
When the form is submitted on this page, the URL does not change, even though the user has selected a different year to view. Everything seems to actually be working correctly. When the year is changed from 2010 to 2008 on the form, the correct information for 2008 is displayed from the web server.
However, the URL displayed in the browser continues to display 2010. While this is not a real problem, I feel like it would be nice to display the direct URL for this particular dynamic page, ie: activitylog/IT/2008.
What is the preferred method to handle something like this? I believe I could use JQuery to capture the form submit, and generate the new URL using the year selected.
Is there a method built into MVC that could handle this that I am overlooking?