HTML, JavaScript And CSS Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingHTML, JavaScript And CSS Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old May 12th, 2004, 12:53 AM
kingkoo kingkoo is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Apr 2004
Posts: 14 kingkoo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 57 m 59 sec
Reputation Power: 0
How to use ASP to INCLUDE a CSS into the resulting file?

I use ASP to generate a report so it's all server-side.

What we offer is we let users save the resulting report in the HTML format. However once they do that and open the report that's been saved locally, all the formatting is gone. That is of course because of the line

<LINK rel=stylesheet type="text/css" href="./css/report.css">

When saved to a local drive, of course report.css doesn't get saved, so all formatting is gone. Sending them this report.css file and asking them to create a "css" directory in which to store the file is NOT an option.

Therefore, what I'm after is a way to include the entire report.css file together as the output of the report.

So when you view the source of the report, instead of seeing

<HEAD>
<TITLE>Test Report</TITLE>
<LINK rel=stylesheet type="text/css" href="./css/report.css">
</HEAD>

You'll actually see:
<HEAD>
<TITLE>Test Report</TITLE>
<STYLE>
BODY
{
FONT-SIZE: 10pt;
FONT-STYLE: normal;
FONT-FAMILY: Arial, Verdana, 'MS Sans Serif'
}
</STYLE>
</HEAD>



Of Course, the report.css does not have the <STYLE> and </STYLE> tags, so I still have to add that manually.

So what I think I have so far is this:

response.write "<HEAD>"
response.write "<TITLE>Test Report</TITLE>"
response.write "<STYLE>"
[THIS IS THE PART I'M MISSING]
response.write "<STYLE>"
response.write "</HEAD>"

So basically I'm trying to see if there's a way to include the entire file in another file. Can someone give me a hint with this missing part?

Any help is greatly appreciated.

Thanks a lot
King

Reply With Quote
  #2  
Old May 12th, 2004, 04:35 PM
kingkoo kingkoo is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Apr 2004
Posts: 14 kingkoo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 57 m 59 sec
Reputation Power: 0
HI there,

Never mind. I found the solution.

Thx for reading

Reply With Quote
  #3  
Old May 12th, 2004, 04:59 PM
Memnoch's Avatar
Memnoch Memnoch is offline
Unholy Moderator
ASP Free God 14th Plane (11500 - 11999 posts)
 
Join Date: Oct 2003
Location: In hell, where did you think?
Posts: 11,760 Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level) 
Time spent in forums: 3 Weeks 5 Days 5 h 22 m 16 sec
Reputation Power: 443
You could do it like this
Code:
<!--#include file="myStyleSheet.css" -->
<%
Response.write("<span class=""myStyleClass"">HELLO</span>")
%>

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingHTML, JavaScript And CSS Help > How to use ASP to INCLUDE a CSS into the resulting file?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway