converting virtual path to actual web path in ASP.NET

后端 未结 3 1616
太阳男子
太阳男子 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:14

    Control.ResolveClientUrl(url)
    

    or

    Control.ResolveUrl(url)
    

    Whichever one you need (honestly I dont know the difference, as both seem to return mostly the same, perhaps someone can illuminate me :) ).

提交回复
热议问题