Thanks Peter, I think I'm close. But I'm getting this error.
"Compiler Error Message: CS0103: The name 'litDocHead' does not exist in the current context"
In MyPage.master, I wrapped my literal head markup as recommended.
<asp:literal id="litDocHead">
... HTML ...
</asp:literal>
Then in MyPage.master.cs, I included your ResolveUrl
protected void Page_Load(object sender, EventArgs e)
{
litDocHead.Text = litDocHead.Text.Replace("~", ResolveUrl("~"));
}
Thinking that possibly I was running this code at Load and the literal had not yet been created, I tried several other events Page_PreRender, PreRenderComplete, etc. but I received the same error each time. As you can probably tell I'm familiar with the various stages in page lifecycle, but not yet comfortable with exactly what's going on at each point. And this is my first time really using ResolveUrl.
Or is the problem that I'm trying to do this in the master page? I would really like to be able to call the stylesheet in the master page, and do so from the app root so that any page in any folder/subfolder will still locate the stylesheet and favicon.
-------------------------
Whatever you can do or dream you can, begin it. Boldness has genius, power and magic in it. Begin it now.
-Johann von Goethe
When Two Hearts Race... Both Win.
-Dove Chocolate Wrapper
Chroniclemaster1, Founder of
www.EarthChronicle.com
A Growing History of our Planet, by our Planet, for our Planet.