H
homawong
In the header section of the master page I have
<script src="JavaScript/MyScript.js"></script>
<link href="CSS/MyCSS.css" type="text/css" rel="stylesheet" />
Since both of them are relative url, when the client request for a page
in a different directory other then the one master page locate will
break faild to load the css and script.
It is possible to do with absolute url but it is fagile. And during
development the project is under a virtual directory or in a file
system so "/CSS/MyCSS.css" doesn't work.
For script, a get around solution is to load the file from code behind,
but I can't find a way to do that with CSS, not to say this way is
ugly.
Another solution is using skin, but I'm not sure the designer will
happy with it.
Homa
<script src="JavaScript/MyScript.js"></script>
<link href="CSS/MyCSS.css" type="text/css" rel="stylesheet" />
Since both of them are relative url, when the client request for a page
in a different directory other then the one master page locate will
break faild to load the css and script.
It is possible to do with absolute url but it is fagile. And during
development the project is under a virtual directory or in a file
system so "/CSS/MyCSS.css" doesn't work.
For script, a get around solution is to load the file from code behind,
but I can't find a way to do that with CSS, not to say this way is
ugly.
Another solution is using skin, but I'm not sure the designer will
happy with it.
Homa