title: MVC: capture route url's and pass them to javascript function
body: <p><strong>Short:</strong><br/>Is there a way to have a route-definition that will pass the "CONTROLLER/ACTION" string value to a JavaScript function in stead of actually going straight for the controller action?</p>
  
  <p><strong>More:</strong><br/>I have a masterpage which contains the navigation of the site. Now, all the pages need this navigation wrapped around it at all times, but because I didn't want the navigation to constantly load with each pagecall, I changed all my pages to partialviews.
  These partial views are loaded via the JQuery.Load() method whenever a menu item is clicked in the navigation.</p>
  
  <p>This all worked very good, up till now because I noticed it's also a requirement of the website to be able to link directly to page X, rather then default.aspx.</p>
  
  <p><strong>So, as an example:</strong><br/>The main page is my "default.aspx" page, this utilizes my master page with the navigation around it. And each call to a new page uses a javascript function that loads that particular partial view inside a div that is known in my masterpage. So, the url never changes away from "default.aspx", but my content changes seemlesly.</p>
  
  <p>The problem is, those url's also need to be available when typed directly into the address bar. But, they're partial views, so loading them directly from the address bar makes them display without any masterpages around them.  Therefore my question if it might be possible to capture the route typed into the address bar and pass that on to my JavaScript function that will load that route in the content div.</p>
  
  <p>(I hope I explained it ok enough, if not, feel free to ask more information)</p>