Master Pages and Relative Links
So you have a master page thats used for content pages in sub folders.
ASP.NET will be smart enough to catch some urls in the master page and rebase them according to where the content pages is. Most of the time. In a few cases such as:
< style type="text/css">
@import url(/s/main.css);
@import url(/s/schedular.css);
< / style >
ResolveClientUrl() does the trick we're looking for here.
< style type="text/css">
@import url(<%= ResolveClientUrl("~/s/main.css")%>);
@import url(/s/schedular.css);
< / style >
Thanks to: http://www.odetocode.com/Articles/450.aspx for the answer.
Reading the post makes me think I should prefer the type of links .NET recognises.
NB: Stop mangling my style tags blogger!
Labels: ASP.NET, Master Pages


0 Comments:
Post a Comment
<< Home