Click here to Skip to main content
15,887,337 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello

I have an issue and I just can't seem to wrap my head around it.

The site I have put up for you guys to see is: cykilic.mrincapps.co.za/TestHome.aspx

I have also enabled unsecure mode so you guys can check the css: <link rel="stylesheet" href="Styling/GetCSS.aspx?PID=1303&TP=CSS" type="text/css"></link>

Now if I navigate to the css page cykilic.mrincapps.co.za/Styling/GetCSS.aspx?PID=1303&TP=CSS
I have no issues with returning a perfectly good css file.

Now here is the problem: I can't get the browser to read the css file...

If I link the css using traditional methods: <link rel="stylesheet" href="http://yui.yahooapis.com/pure/0.3.0/pure-min.css"></link> OR <link rel="stylesheet" href="/Css/pure-min.css"></link>
It works fine and does display the correct look on the site.

The Javascript code has no issue displaying on the site just for information.

The reason for this complexity: Security

Question: I need help trying to understand why the browser doesn't like to render the dynamic css file I give it.

Thanks
Posted
Comments
ZurdoDev 23-Nov-13 22:38pm    
What do you mean by dynamic css? How are you loading it differently? Very likely the url is wrong in your dynamic approach. You can use the browser developer tools to see what is trying to get downloaded and also trace the CSS that is applied.
M.R. Inc 24-Nov-13 7:13am    
The CSS is dynamically generated ...I don't know how else to explain this

Well if you look at the site you can see, it generates an id to pull and displays on the page for the page to pull it.

If I run in debug mode and put a break point in my GetCSS.aspx, it Always breaks once the page is loaded. - It breaks twice as Js and Css pulls

It just WONT load the damn css but has no issue loading the javascript.

Any other ideas?
Kornfeld Eliyahu Peter 24-Nov-13 7:32am    
I looked into your TestHome.aspx page, but there is no <link> tag in it...
M.R. Inc 24-Nov-13 7:55am    
Sorry*

Had recently sent update to server and changed something so it was catching an error.

Please view now.

Still same issue tho.

And I cant get the link to echo on the page without it turning an & into an &

Thanks
Kornfeld Eliyahu Peter 24-Nov-13 8:16am    
What I see that you return text/html, you may try to change your response MIME type to text/css...

1 solution

Kornfeld Eliyahu Peter: What I see that you return text/html, you may try to change your response MIME type to text/css...

Changing the header response to text/css worked.

Thanks man!!!
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900