title: Get Route values from returnurl in LogIn action method
body: <p>I have a url that looks like this </p>
  
  <pre><code>http://mysite/account/login?returnurl=/Event/Details/41
  </code></pre>
  
  <p>and <code>returnUrl = "/Event/Details/41"</code></p>
  
  <p>I need to get the route values from return url - which includes the EventID = 41</p>
  
  <p>I was able to get the event Id using this code:</p>
  
  <pre><code>public ActionResult Login()
  {
     ....
     string returnUrl = Request.QueryString["ReturnUrl"];
     int lastIndex = returnUrl.LastIndexOf("/") + 1;
     string strEventID = returnUrl.Substring(lastIndex);
     int EventID = Int32.Parse(strEventID);
     ....
  }
  </code></pre>
  
  <p>But I feel there could be a more flexible way that would give me access to querystrings, route values, etc, without manually doing it this way.</p>
  
  <p>I dont't want to use WebRequest, WebClient and blah blah, just looking for MVC related solution  or something simpler.</p>