IIS virtual directory and ASP.NET directory paths

前端 未结 2 1020
心在旅途
心在旅途 2020-12-09 09:51

The problem

I\'m running into the typical virtual-directory dilemma in that you have some paths on your ASP.Net application and you deploy the app in a IIS virtual

2条回答
  •  Happy的楠姐
    2020-12-09 10:19

    If it's just for css files on the client side then using the url directive makes the path relative to that of the style sheet rather than the page:

    h1#title { background: url('dog.gif') no-repeat 0 0; } 
    

    Also if you're on asp.net mvc then you have access to:

    
    

提交回复
热议问题