There's new classes in 2.0. Here is a commented dump of some code...
#region HTML Head Section...
//NOTE: THESE METHODS ARE FUNCTIONAL BUT COMMENTED OUT UNTIL
NEEDED
// Add meta tags
//HtmlMeta meta1 = new HtmlMeta();
//meta1.Attribute s.Add("descript ion", "blah blah blah");
//HtmlHead head = (HtmlHead)Page. Header;
//head.Controls.A dd(meta1);
//// Add style sheets
//HtmlLink link1 = new HtmlLink();
//((HtmlHead)Page .Header).Contro ls.Add(link1);
//link1.Href = "~/StyleSheets/TestInheritence .css";
//link1.Attribute s.Add("rel", "Stylesheet ");
//link1.Attribute s.Add("type", "text/css");
// Add javascript files
//HtmlLink link2 = new HtmlLink();
//((HtmlHead)Page .Header).Contro ls.Add(link2);
//link2.Href = "Scripts.js ";
//// older browsers
//link2.Attribute s.Add("language ", "JavaScript ");
//// newer browsers
//link2.Attribute s.Add("type", "text/JavaScript");
#endregion
<%= Clinton Gallagher
METROmilwaukee (sm) "A Regional Information Service"
NET csgallagher AT metromilwaukee. com
URL
http://metromilwaukee.com/
URL
http://clintongallagher.metromilwaukee.com/
<ho******@gmail .com> wrote in message
news:11******** *************@f 14g2000cwb.goog legroups.com...
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