I have looked online but was unable to find the difference between using @Url.Content vs @Url.Action.
@Url.Content
@Url.Action
Url.Content is used when you wish to resolve a URL for any file or resource on your site and you would pass it the relative path:
Url.Content
@Url.Content("~/path/file.htm")
Url.Action is used to resolve an action from a controller such as:
Url.Action
@Url.Action("ActionName", "ControllerName", new { variable = value })
See here for more info:
http://geekswithblogs.net/liammclennan/archive/2008/05/21/122298.aspx
2.1m questions
2.1m answers
60 comments
57.0k users