I'm using Url.Content("~/something.jpg") to get an absolute path in a view without problem.
I would like to use it in a controller but it doesn't work. It returns "/something.jpg" instead of "http://www.mydomain.com/something.jpg".
I tried several tricks found on google and stackoverflow without success.
Why Url.Content() doesn't work in a controller ?
Any idea will be helpful.
Thank you
~will point to the route of the site, soURL.Content()is doing what's expected. Can you post the code you're using in the controller?~would resolve to/.