converting virtual path to actual web path in ASP.NET

后端 未结 3 1677
太阳男子
太阳男子 2021-01-30 21:32

I have a virtual path (example: \"~/Images/Banner.jpg\") and I want to make that an absolute web path (example: \"/ApplicationRoot/Images/Banner.jpg\"). There is a method tha

3条回答
  •  感动是毒
    2021-01-30 22:17

    System.Web.VirtualPathUtility.ToAbsolute("yourRelativePath");
    

    There you go :)

提交回复
热议问题