Posted on: 3/25/2011 2:07:12 AM | Views : 271

Hi, I'm trying to have absolut paths working on both the editor and the browser. Problem is, I can get the absolute path to work on the browser OR the editor, not both at the same time. In the head, I import the style class:
<style type="text/css">@import url('/imagens/global.css');</style>
This works with the editor, but the browser does not seem to understand that. If I remove the leading slash, then the browser understands it, as well as the editor, but then, the path becomes relative and pages that uses the master page and are located on other sub folders won't find that path.
Then I found the ResolveUrl solution:
<style type="text/css">@import url('<%=ResolveUrl("~/") %>imagens/global.css');</style>
This works great on the browser and the sub folder the child page lives doesn't matter and I can get all the pages to load properly.
But this solution does not work on the visual studio editor, so it makes ...

Go to the complete details ...