473,395 Members | 1,583 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,395 software developers and data experts.

CSS Printing different than aspx page

In my web application, I am using two different CSS based on media. In my
Print CSS, I can suppress button, header and ad objects using "Display:
None;". However, I need to print an object that does not actually display on
the ASPX page. In my Screen CSS, I tried to use "Display: None" for that
object (by ID). It will not print based on my various attempts to print that
object (by ID) in my Print CSS.

I would appreciate suggestions on how I can print an object but not display
that object on my ASPX page. I prefer to use CSS if possible.

Thanks!
Jun 5 '07 #1
1 2490
Lynda,

Here is a sample of how to do this with CSS. For my purposes, this
displayed a DropDownList to the user of the site, but hid it and displayed a
text label upon printing.

..accountListDropdown
{
text-transform: capitalize;
font-size: 0.9em;
}

..accountListLabel
{
display: none;
visibility: hidden;
}

@media print
{
.accountListDropdown
{
display: none;
visibility: hidden;
}

.accountListLabel
{
display: inline;
visibility: visible;
text-align: left;
}
}

Hope this helps,
Steve
"Lynda" <Ly***@discussions.microsoft.comwrote in message
news:92**********************************@microsof t.com...
In my web application, I am using two different CSS based on media. In my
Print CSS, I can suppress button, header and ad objects using "Display:
None;". However, I need to print an object that does not actually display
on
the ASPX page. In my Screen CSS, I tried to use "Display: None" for that
object (by ID). It will not print based on my various attempts to print
that
object (by ID) in my Print CSS.

I would appreciate suggestions on how I can print an object but not
display
that object on my ASPX page. I prefer to use CSS if possible.

Thanks!

Jun 6 '07 #2

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

Similar topics

1
by: wolfiecat | last post by:
Hello - I am new to this forum. Let me start off by saying that I have never used ASP before. I am working on a project where the site was already created using frames and .aspx pages. I was...
0
by: Niyazi | last post by:
Hi all, This my aspx page first line of code. <%@ Page CodeBehind="index.aspx.vb" Language="vb" AutoEventWireup="false" Inherits="TB.index" %> Than inside head tag I have following script(s)...
1
by: Smitha Nataraj | last post by:
Hello, Please let me know if you have the solution for a similar kind of problem... Background: I have an aspx page which is used as a report i.e. will be used for printing some information....
2
by: Sukh | last post by:
Hi I am stuck with a problem Can anyone help me out from this... I am printing a report on pre-printed continue paper using dot-matrix printer using vb.net. Data is printing on all the...
6
by: Siv | last post by:
Hi, I am getting into printing with VB.NET 2005 and want to implement the usual capability that a user can select a selection of pages. I have a report that is generated by my application that if...
4
by: Lucas Ponzo | last post by:
Hi All, I have an ASP.NET 2.0 app. The users access the pages, uniquely via pocket pc ... I need to print a page. But I need that the page print on a printer installed on the web server...
8
by: Neo Geshel | last post by:
Greetings. BACKGROUND: My sites are pure XHTML 1.1 with CSS 2.1 for markup. My pages are delivered as application/xhtml+xml for all non-MS web clients, and as text/xml for all MS web...
2
by: deepakfordotnet | last post by:
Hi, First of all let me confess that I could not get the solution to the same problem from an earlier post Printing :by Mr.Richard MSL (dated September 24th 2006) working. (Replied by Mr.Walter...
18
by: Brett | last post by:
I have an ASP.NET page that displays work orders in a GridView. In that GridView is a checkbox column. When the user clicks a "Print" button, I create a report, using the .NET Framework printing...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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
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...
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.