Hi
I have a dynamic style sheet which is a asp page and am using <linktag to
point to the asp page....i have the type and rel setup as given below....
link1.Attributes.Add("rel", "stylesheet");
link1.Attributes.Add("type", "text/css");
Page.Header.Controls.Add(link1);
i have added the following code to the asp page
Response.ContentType = ("text/css")
Response.Clear()
Response.BufferOutput = True
but still its not working..................none of the style attributes are
set in my page........ any idea why this is happening...........
"gchq" wrote:
>
"coconet" wrote:
Server is Win2K3/IIS6.
I have an ASPX page with this in the <headtag:
<link rel="stylesheet" type="text/css" href="<%
Response.Write( "http://" +
Request.ServerVariables["SERVER_NAME"].ToString() +
this.ResolveUrl("~") + "styles/styledefault.aspx"); %>" />
The style.aspx page looks like this:
body
{
background: #655A46 url('<% Response.Write(
this.ResolveUrl("~") + "media/"); %>bg.gif');
color: #543;
font: normal 62.5% "Lucida Sans Unicode",sans-serif;
}
....
The purpose is to have dynamically-changing styles. The page renders
fine with my external and dynamic style sheet in IE7, but in FireFox
the style appears to be ignored. What can I do to make this work?
Thanks.
Had the same problem - add this to the code behind (before the content) and
it will display OK in firefox
Response.ContentType = ("text/css")
Response.Clear()
Response.BufferOutput = True