ASp.NEt MVC: how to parse url string to get RouteData

Posted by Feryt on Stack Overflow See other posts from Stack Overflow or by Feryt
Published on 2010-05-18T11:58:01Z Indexed on 2010/05/19 0:20 UTC
Read the original article Hit count: 1487

Filed under:
|

Hi.

Is there any way hot to get RouteData from url string?

I have login form with returlUrl as query string parameter. My routes are defined as : {languageCode}/{controller}/{action}

In action method LogIn(string returlUrl) the returlUrl is something like "en/home/contacts" etc. I need to change languagePart a i dont want to use string.Replace, as routes may change in future.

Thank you.

© Stack Overflow or respective owner

Related posts about asp.net-mvc-2

Related posts about routing