473,289 Members | 2,155 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,289 software developers and data experts.

print a user-friendly page?

Hello,

does anybody have an example on how to add a hidden frame to an aspx page
and then to use thtat hidden frame to print a user friendly version of the
web page?

The web page does print very bad, because of background pictures and logo's,
list's etc.
May 15 '06 #1
4 1257
It may help you to know that you can use client side events onbeforeprint
and onafterprint to hide/show/style elements of your page before and after
printing.

Eliyahu

"Axford" <Ax****@discussions.microsoft.com> wrote in message
news:81**********************************@microsof t.com...
Hello,

does anybody have an example on how to add a hidden frame to an aspx page
and then to use thtat hidden frame to print a user friendly version of the
web page?

The web page does print very bad, because of background pictures and
logo's,
list's etc.

May 15 '06 #2
Hi Axford,
unless I have misunderstood what you mean, there is no need to create hidden
frames or anything like what you propose.

If you are using style sheets, then you style your page for the screen as
per normal and then you create a printing style sheet and add it to your
..aspx page (in the head) section like so

<link rel="stylesheet" type="text/css" href=[your location here]
media="print" >
(for the screen stylesheet you don't have to specify media="screen" as that
is the default)

inside that print style sheet you have ids or class like so:
yourID
{
display:none;
}
that way you can hide logos, mastheads and in fact anything that you wish to
take out of the printing page.

Regards,
CharlesA
May 15 '06 #3
nice idea, thansk.
however up to now I didn't use stylesheets.

"CharlesA" wrote:
Hi Axford,
unless I have misunderstood what you mean, there is no need to create hidden
frames or anything like what you propose.

If you are using style sheets, then you style your page for the screen as
per normal and then you create a printing style sheet and add it to your
.aspx page (in the head) section like so

<link rel="stylesheet" type="text/css" href=[your location here]
media="print" >
(for the screen stylesheet you don't have to specify media="screen" as that
is the default)

inside that print style sheet you have ids or class like so:
yourID
{
display:none;
}
that way you can hide logos, mastheads and in fact anything that you wish to
take out of the printing page.

Regards,
CharlesA

Jun 2 '06 #4
good idea, thanks.
"Eliyahu Goldin" wrote:
It may help you to know that you can use client side events onbeforeprint
and onafterprint to hide/show/style elements of your page before and after
printing.

Eliyahu

"Axford" <Ax****@discussions.microsoft.com> wrote in message
news:81**********************************@microsof t.com...
Hello,

does anybody have an example on how to add a hidden frame to an aspx page
and then to use thtat hidden frame to print a user friendly version of the
web page?

The web page does print very bad, because of background pictures and
logo's,
list's etc.


Jun 2 '06 #5

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

Similar topics

21
by: Leonardo | last post by:
I have the following associative array: $user=1; $user=1; $user=0; $user=1; $user=0; $user=1; $user=1;
0
by: John | last post by:
I have a class that creates an AxWebBrowser object in the background, loads some arbitrary html content, then shows the user a print preview. The only problem is, this print preview is a tiny...
7
by: Frank | last post by:
Guys I have got an exe which takes a printername and file(s) as arguments for printing. This is running fine on the local machine (printing to a network printer from the local machine) Can I...
6
by: Catalin Porancea | last post by:
Hello, How do I print a web form as soon as it is displayed, without any user intervention? Thank you, Catalin
10
by: aatish19 | last post by:
1: Write a program that asks the user to input an integer value and print it in a reverse order Sample Output Enter any number 65564 Reverse of 65564 is 46556 2: Write a program that takes a...
2
by: eclectic.01 | last post by:
I need to control the way a document is printed ... I would like a user to print a 'ticket', however, if multiple 'tickets' are selected, each ticket must be printed separately (separate piece of...
2
by: Bill_DBA | last post by:
I have the following stored procedure that is called from the source of a transformation in a DTS package. The first parameter turns on PRINT debug messages. The second, when equals 1, turns on the...
1
by: user | last post by:
Hello ! i just you like to know if it's possible to print an upload document with asp.net ? People will upload a document that will be directly print on a printer connected to the asp.net...
0
by: EricJudge06 | last post by:
We are converting some reports from Crystal Reports to Microsoft SQL Reporting Services (SSRS) in an ASP 2.0 VB.Net web app. Crystal had a function called PrintToPrinter which was being used to...
11
by: JWest46088 | last post by:
I'm having difficulty trying to figure out how to print a text file from a hash table one line at a time. I have the text file read into the hash table and can print the text file all at once, but I...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...

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.