I am new to MVC4 / razor2, and I understand that the general benefit of using @Url.Contentand @Url.Action- when changing my routing or virtual directory magic-url-lines are displayed correctly.
I am looking at some inherited Javascript-with-razor code in the view that is being applied to '@Url.Content("~")'. This is displayed as the '/'- or, root of the site. What ... would always be like that, no?
Or is there some kind of situation in which this can be done differently?
Note: this is not ~/ just a single tilde.
I plan to extract razor calls to helper functions and move the main JavaScript block to an external file (for lithiation and overall "cleanliness"). I don’t need to “fix” everything that is currently happening, but I would like to better understand it.
source
share