Very simple question but I am unable to find an answer, I have a MVC 2 app in C#
I have a ActionResult the accept's HTTP POST's
How do I find out the URl of any posts to my ActionResult.
Thanks,
Very simple question but I am unable to find an answer, I have a MVC 2 app in C#
I have a ActionResult the accept's HTTP POST's
How do I find out the URl of any posts to my ActionResult.
Thanks,
I think you're looking for:
HttpContext.Current.Request.Url
To ease testability you should look to abstract your use of HttpContext
as it's a pain to mock. Try wrapping your access to it in a separate object you can inject.