473,666 Members | 2,039 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Dynamic ASPX Style Sheet not Render in FireFox?

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.ServerV ariables["SERVER_NAM E"].ToString() +
this.ResolveUrl ("~") + "styles/styledefault.as px"); %>" />

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.

Dec 29 '07 #1
4 4206
Howdy,

I reckon it should be:

<link rel="stylesheet " type="text/css" href="<%=
ResolveClientUr l("~/styles/styledefault.as px") %>" />

Regards
--
Milosz
"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.ServerV ariables["SERVER_NAM E"].ToString() +
this.ResolveUrl ("~") + "styles/styledefault.as px"); %>" />

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.

Dec 30 '07 #2
Hi coconet,

Would you mind letting me know the result of the suggestions? If you need
further assistance, feel free to let me know. I will be more than happy to
be of assistance.

Have a great day!

Sincerely,
Jialiang Ge (ji****@online. microsoft.com, remove 'online.')
Microsoft Online Community Support

=============== =============== =============== ====
When responding to posts, please "Reply to Group" via your newsreader
so that others may learn and benefit from your issue.
=============== =============== =============== ====
This posting is provided "AS IS" with no warranties, and confers no rights.

Jan 4 '08 #3


"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.ServerV ariables["SERVER_NAM E"].ToString() +
this.ResolveUrl ("~") + "styles/styledefault.as px"); %>" />

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.Conten tType = ("text/css")
Response.Clear( )
Response.Buffer Output = True
Feb 12 '08 #4
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.Attribute s.Add("rel", "stylesheet ");
link1.Attribute s.Add("type", "text/css");
Page.Header.Con trols.Add(link1 );

i have added the following code to the asp page
Response.Conten tType = ("text/css")
Response.Clear( )
Response.Buffer Output = 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.ServerV ariables["SERVER_NAM E"].ToString() +
this.ResolveUrl ("~") + "styles/styledefault.as px"); %>" />

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.Conten tType = ("text/css")
Response.Clear( )
Response.Buffer Output = True
Mar 6 '08 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

19
15600
by: Roger | last post by:
How can I pass parameters to a style sheet? I have noticed a couple of sites are now passing variables to the style sheet, which appear to be substituted at run time. For example: <link rel="stylesheet" type="text/css" href="mystyle.css?color=ffffff"> I have seen references in my temp Internet file directory that indicates this is possible, but I can't find any documentation how to do it.
2
1151
by: Wade Beasley | last post by:
I have a web site I am working on for a client using ASP.NET with VB.Net for the language. The client decided they needed the ability to choose between different page layouts based on a setting in the database. I have the header and footer working correctly by using a custom base page and before the Page_Load loading the correct version from a subdirectory with the Layout Number as the directory name. Now what I need is the ability to...
7
10893
by: Don Wash | last post by:
Hi There! I'm creating several ASCX Controls and those controls will have their own CSS Style Sheets. But I don't know how I can link the corresponding Style Sheet in the ASCX file? Because the style sheet can only be linked in the <head></head> section of an HTML document, right? So ASCX controls does not have <head> tags so how can I link the style sheets? Many thanks in advance! Don
2
1381
by: Matthew McDermott | last post by:
Hi, I am working on "reskinning" an application that uses style sheets. I have been editing the default stylesheets by adding my alterations to the bottom of the .css files. I was wondering if there was a way to add an "include" at the bottom of the existing stylesheets to point to another stylesheet, this would prevent my changes from being overwritten if the product upgrade overwrites the
2
3659
by: Kenneth P | last post by:
Hi, I'm developing asp.net (vb) apps in VS.NET 2003, and I'd like to know how you can write style sheet code in a sub in an .aspx page that when it's rendered as html/text/css code in the .aspx page. The idea is to programmatically write style sheet code that dynamically goes into every page and is rendered accordingly. Let's assume I wanted this kind of code into my rendered .aspx page
2
1953
by: David W | last post by:
I need to include a style sheet link in the aspx page based on what user they are. Basically this functionality, but using code behind. Any idea how to change this line to code behind? This breaks once we include an AJAX control on the page. <head runat="server"> <link href="/textfiles/style<%= Session("partner_id") %>.css" rel="stylesheet" type="text/css">
1
1858
by: abaybas | last post by:
I'm creating a page in which a certain "content" part of the page is refreshed using ajax. I do this by using a div#content, and it's child div#container. the code: ... // clean container first var container = document.getElementById("container") container.parentNode.removeChild(container);
3
2932
by: =?Utf-8?B?U3ViYQ==?= | last post by:
I am using a asp page to dynamically create a stylesheet my asp page creates the following css element when i call the asp page my typing the url in the browser. My asp page works fine............ body { font-family : Arial, Helvetica, Sans-Serif, Verdana ; margin : 0 ; padding : 0 ; }
5
1754
by: user1980 | last post by:
Hi there, I am not sure if this question comes under Html or javscript.... I have an asp page where I am trying to display/hide few table rows based on a drop down selection. the code is as follows, <table><tr bgcolor="#f3f3f3"> <td>School</td> <td><select name="selectschool1" id="selectschool1" onchange="changeSchool1();"> <option value="">Please select a school</option> <option value="NUSchool">School A</option>
0
8356
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8871
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8552
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8640
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7387
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6198
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4369
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2773
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2011
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.