Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Apr 27th, 2012  |  syntax: None  |  size: 0.26 KB  |  hits: 13  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. How can I find out the href that was used to call my controller in MVC
  2. Request.UrlReferrer
  3.        
  4. @Html.ActionLink("click me", "foo", new { url = Request.RawUrl })
  5.        
  6. public ActionResult Foo(string url)
  7. {
  8.     ...
  9. }
  10.        
  11. string fullPath = Request.Url.AbsoluteUri