How can I take a URL passed to a MVC controller as a POST parameter, and turn it into Route Data. (After I have the route info, I'll create and render a view, but I've found how to do that.) I just can't for the life of me figure out how to tell my application to take an arbitrary string and put it through the RouteTable.
Let me explain what I want this information for, in case I just have my head stuck someplace stinky:
I have an MVC application that's working fine. Currently, when someone clicks on a link in a browser that supports pushState, I intercept the link, grab the page with $jquery.get, and update the contents of the page. (This way, if the user has JavaScript disabled, or is using IE, all the links point to the normal locations.)
It all works, but there are niggardly details like the page title which have to be embedded in the HTML, because not all browsers will read it out of the response when it's converted to a jQuery object.
What I WANT to do is switch to POST that calls a single controller, passes it the URL, and gets back a JSON object containing the HTML, the title, and maybe a few other things like directions on what visual transitions to perform.
There are several different controllers, so I'd rather not rewrite each one individually.