c# - Link to a file in MVC 5 ASP.NET -
c# - Link to a file in MVC 5 ASP.NET -
i trying create link file within folder @ site root. of have method in controller returns url user folder when create link in view path starts name of current controller, e.g.
http://site/controller/~/usercontent/userdir/path/file.jpg
my view has next code:
@html.actionlink("view ", viewdata["fspath"] + img.path);
how can remove controller value url?
thanks
you want utilize @url.content. e.g.
@url.content("~/usercontent/userdir/path/file.jpg")
c# .net
Comments
Post a Comment