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 15th Plane (12000 - 12499 posts)
 
Join Date: Oct 2003
Location: In hell, where did you think?
Posts: 12,025 Memnoch User rank is Brigadier General (60000 - 70000 Reputation Level)Memnoch User rank is Brigadier General (60000 - 70000 Reputation Level)Memnoch User rank is Brigadier General (60000 - 70000 Reputation Level)Memnoch User rank is Brigadier General (60000 - 70000 Reputation Level)Memnoch User rank is Brigadier General (60000 - 70000 Reputation Level)Memnoch User rank is Brigadier General (60000 - 70000 Reputation Level)Memnoch User rank is Brigadier General (60000 - 70000 Reputation Level)Memnoch User rank is Brigadier General (60000 - 70000 Reputation Level)Memnoch User rank is Brigadier General (60000 - 70000 Reputation Level)Memnoch User rank is Brigadier General (60000 - 70000 Reputation Level)Memnoch User rank is Brigadier General (60000 - 70000 Reputation Level)Memnoch User rank is Brigadier General (60000 - 70000 Reputation Level)Memnoch User rank is Brigadier General (60000 - 70000 Reputation Level) 
Time spent in forums: 3 Weeks 6 Days 12 h 21 m 3 sec
Reputation Power: 628
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





 Free IT White Papers!
 
Create the Optimal Architecture for your Critical Applications
Warburton's the largest independently owned bakery in the UK faced a number of difficult challenges in providing the most robust yet efficient IT infrastructure for their organization's success. IBM's services combined with their xSeries servers created the perfect platform for their SAP environment with sufficient flexibility, and did so in very time effective fashion.

 
Five Best Practices for Deploying a Successful Service-Oriented Architecture
This white paper describes the benefits you can expect with SOA, and how IBM can help take your business there.

 
Gartner Magic Quadrant for Application Delivery Controllers
Gartner summarizes its view on Application Delivery Controllers, evaluates strengths and weaknesses of solutions, and provides Magic Quadrant reporting for a quick comparison across all vendors. Learn from Gartner how you can benefit from an all-in-one device like Citrix NetScaler that delivers the highest levels of availability, performance and security.

 
Knowledge is Power
What you don't know can hurt you, and is likely costing you money and increasing your security risks during an era of scarce resources. This white paper proposes six key strategies that enterprise security managers can use to improve their network defense posture.

 
Rationalizing the Multi-Tool Environment
The rationalized multi-tool approach is flexible, scalable and cost effective. It provides the necessary input to the IT service management business processes. It preserves prior investments in monitoring tools, empowers technologists to select the best tools with which to do their jobs, and enhances effective response to incidents.

 

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





© 2003-2010 by Developer Shed. All rights reserved. DS Cluster 6 Hosted by Hostway
For more Enterprise Application Development news, visit eWeek