문제

I'm not pretty sure what I've done wrong here every thing seems fine but once I added the absolute path for it it sopped working neither the pages within the same folder nor the pages in other folders

<link id="Link1" type="text/css" rel="stylesheet" href="~/styles/Master.css" runat="server"/>
        <link id="Link2" rel="stylesheet" type="text/css" href="~/styles/sooperfish.css" media="screen" runat="server"/>
        <link id="Link3" rel="stylesheet" type="text/css" href="~/styles/sooperfish-theme-large.css" media="screen" runat="server"/>
도움이 되었습니까?

해결책

Did you tried

...href="<%=ResolveUrl("~")%>styles/Master.css"...

This works for me normally.

This is because the application home path is with a subdirectory in it and it cannot resolve it through the browser.

Hope it helps.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top