473,397 Members | 1,985 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

App_Themes and stylesheets for print

We are using themes (skin files and css files in the App_Theme) folder of a
large web application.

We are now implementing print functions on our pages. Earlier we've done
this by having separate stylesheets for screen and print using the media
attribute to specify usage.

e.g.:
<link rel="stylesheet" type="text/css" media="screen" href="screen.css"/>
<link rel="stylesheet" type="text/css" media="print" href="print.css"/>

But i ASP.NET 2.0 using themes any stylesheet that resides in a theme
folder is "automagically" referenced from any webpage without specifying
the media attribute.

Is there any way to specify media without having to move the stylesheet
files out of the theme folder and manually linking to it?

--
Pål Andreassen
ne**@codroe.com
May 10 '06 #1
4 2574
google htmlhead site:msdn2.microsoft.com

Its a new class in 2.0 that I've determine may be used to work around the
way Microsoft has crippled the use of CSS when using Themes. I didn't finish
refining or proving it can be done yet but the goal is to generate your
declaration "after" that which the Theme generates so as to inherit which
you probably understand. There is also the HtmlLink class in this context to
consider and as I recall an HtmlMeta class.

Please return to make note of your success or failure trying to over-ride
the Theme by writing a style sheet that appears "after" the stylesheet used
with the Them as I need to get back to this myself and would appreciate it
if somebody has the time to get it done now and can convey how to do it as
there is a trick involed as I remember several months back before I was
distracted away from perfecting the work-around.

<%= Clinton Gallagher
NET csgallagher AT metromilwaukee.com
URL http://www.metromilwaukee.com/clintongallagher/

"Pål Andreassen" <ne**@codroe.com> wrote in message
news:Xn**********************************@213.131. 157.161...
We are using themes (skin files and css files in the App_Theme) folder of
a
large web application.

We are now implementing print functions on our pages. Earlier we've done
this by having separate stylesheets for screen and print using the media
attribute to specify usage.

e.g.:
<link rel="stylesheet" type="text/css" media="screen" href="screen.css"/>
<link rel="stylesheet" type="text/css" media="print" href="print.css"/>

But i ASP.NET 2.0 using themes any stylesheet that resides in a theme
folder is "automagically" referenced from any webpage without specifying
the media attribute.

Is there any way to specify media without having to move the stylesheet
files out of the theme folder and manually linking to it?

--
Pål Andreassen
ne**@codroe.com

May 10 '06 #2
place the href within the stylesheet itself :

@media print
{
...
}

"Pål Andreassen" <ne**@codroe.com> wrote in message
news:Xn**********************************@213.131. 157.161...
We are using themes (skin files and css files in the App_Theme) folder of a large web application.

We are now implementing print functions on our pages. Earlier we've done
this by having separate stylesheets for screen and print using the media
attribute to specify usage.

e.g.:
<link rel="stylesheet" type="text/css" media="screen" href="screen.css"/>
<link rel="stylesheet" type="text/css" media="print" href="print.css"/>

But i ASP.NET 2.0 using themes any stylesheet that resides in a theme
folder is "automagically" referenced from any webpage without specifying
the media attribute.

Is there any way to specify media without having to move the stylesheet
files out of the theme folder and manually linking to it?

--
Pål Andreassen
ne**@codroe.com

May 10 '06 #3
.... you know what i meant ...
"gerry" <ge**@nospam.nospam> wrote in message
news:ea**************@TK2MSFTNGP05.phx.gbl...
place the href within the stylesheet itself :

@media print
{
...
}

"Pål Andreassen" <ne**@codroe.com> wrote in message
news:Xn**********************************@213.131. 157.161...
We are using themes (skin files and css files in the App_Theme) folder of
a
large web application.

We are now implementing print functions on our pages. Earlier we've done
this by having separate stylesheets for screen and print using the media
attribute to specify usage.

e.g.:
<link rel="stylesheet" type="text/css" media="screen"

href="screen.css"/> <link rel="stylesheet" type="text/css" media="print" href="print.css"/>

But i ASP.NET 2.0 using themes any stylesheet that resides in a theme
folder is "automagically" referenced from any webpage without specifying
the media attribute.

Is there any way to specify media without having to move the stylesheet
files out of the theme folder and manually linking to it?

--
Pål Andreassen
ne**@codroe.com


May 10 '06 #4
"gerry" <ge**@nospam.nospam> wrote in news:eajDsO5cGHA.3632
@TK2MSFTNGP05.phx.gbl:
@media print
{
...
}


Thanks

--
Pål Andreassen
ne**@codroe.com
May 10 '06 #5

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

Similar topics

14
by: Jacqui or (maybe) Pete | last post by:
Having just answered a question about multiple linked stylesheets, I thought I'd have a look at browser support. There's a quick test page here: http://www.porjes.com/ms/ I wrote it...
6
by: Jan Roland Eriksson | last post by:
Archive-name: www/stylesheets/newsgroup-faq Posting-Frequency: twice a week (mondays and thursdays) Last-modified: March 10, 2001 Version: 1.95 URL: http://css.nu/faq/ciwas-mFAQ.html Maintainer:...
2
by: la_haine | last post by:
Hi, A website I work on has a print stylesheet to strip navigation and things out of a page, and changes the fonts and various bits and pieces here and there. What I'd also like is something...
6
by: RobG | last post by:
I came across this site: <URL:http://clearnova.com/index.html> which does not work in any browser other than IE on Windows. I think it's because of the way the stylesheets are referenced...
2
by: micfrost | last post by:
I would like this folder structure for 2 web applications: root/app1/Default.aspx root/app1/App_Themes root/app2/Default.aspx root/app2/App_Themes This will error, because asp.net expects...
9
by: Arancaytar | last post by:
I have so far seen two methods for including external resources as CSS stylesheets in a document. The first is this: <link href="/stylesheets/style.css" rel="stylesheet" type="text/css" /> And...
0
by: Matteo Migliore | last post by:
Hi! I want to publish a web application to manage multiple web sites and different themes, contents etc... The problem is that App_Themes folder, web.config, web.sitemap point to a fixed...
9
by: johkar | last post by:
I need some browser implementation clarification. In the below example, the alternate stylesheet could be invoked by user agents that support alternate stylesheets or by script. Are there any...
0
by: rahuldhammy | last post by:
I am implementing a personalization(customizing the contents of the web site according to the user choice)in asp.net web site.For this i have to delete modify some files in my App_Themes folder.I am...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...
0
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,...
0
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...
0
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,...

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.