473,497 Members | 2,166 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

"Print this Page" MSDN Style

Hi all,

I am implementing a "Print this Page" function in my ASP.NET application.
This function should print a part of the page and I would like to use an
MSDN Style "Print this Page".

I'm going to explain what I would like to do.

Clicking on the print button I would like to show immediately the print
dialog without open a new window with the text formatted for printing.

Now if I implement the window.open() on the onclick event of the button it
works like I want but it prints the entire page instead of printing the
portion of a page I want.
I know this is normal, but I would like to implement a behavior like MSDN to
print a part of the web form with just a click without open any additional
window.

For an example of what I am saying check this MSDN article and try to print
it.

http://msdn.microsoft.com/library/de...AppArchCh2.asp

Thank you all
Nov 19 '05 #1
1 2273
Clicking on the print button I would like to show immediately the print
dialog without open a new window with the text formatted for printing.
I'd suggest NOT doing that. For one, it doesn't work in every browser.
Secondly, people like to see what they're about to print. Thirdly, a lot of
people actually prefer to read the 'print friendly' version of the page on
screen rather than actually printing it.

Just some things to consider.
Now if I implement the window.open() on the onclick event of the button it
works like I want but it prints the entire page instead of printing the
portion of a page I want.
You need to use CSS for this. You create a CSS file for on-screen rendering
and you create a separate one for print rendering. with your method, you
simply create a print CSS file. For a 'print friendly' page, you'd create a
second CSS file and swap it server-side with some back-end logic.
For an example of what I am saying check this MSDN article and try to print it.

http://msdn.microsoft.com/library/de...AppArchCh2.asp

In this case, it's because MSDN is all frames based...it's just printing one
particular frame.

-Darrel
Nov 19 '05 #2

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

Similar topics

3
3533
by: Albert Wagner | last post by:
I have just had a problem that I cannot find any reference to in any docs. Admittedly, I am a JavaScript newbie, but this sure seems like a bug or an "undocumented feature" in Opera 7.11. I have...
17
2367
by: Geoff Cox | last post by:
Hello, I am trying to have 1. web pages in large font 2. web pages with smaller font for printing I am using <link rel="stylesheet" media="print" type="text/css"
8
3329
by: Tony | last post by:
Hello I am learning C# and encountered the following problem when I tried to figure out how to print the string {0} in a Console window The following piece of codes complied OK. But when I...
5
1862
by: Paul Sullivan | last post by:
We are a state agency that views protected medical information via our intranet. The screens even have privacy shields. Alarmingly, uses can "Print" and "Save As" which destroys the protection of...
2
3375
by: Goethals Frederik | last post by:
hi, I have a little problem with the function "Page.GetPostBackClientHyperlink". First some description of my page: It is a simple testpage for testing "selecting a row af the datagrid by...
1
2308
by: Steff | last post by:
I am wandering if my code is making sense... I use a lot the print function. Is it weird in this case where I have to display an array ? I thought it would be better to have the entire array in php...
45
9030
by: Umesh | last post by:
please help. thanks.
0
1250
by: moti far | last post by:
hi, i use stylesheet to design the plot of the print page. The page works with https(ssl) protocol. this my code: <html> <head>
4
3077
by: lander | last post by:
I've read the page life cycle thing in msdn, still, i'm getting a bit confused of thinking how all the things are going under the hood... I know that when page loading, that the controls'...
0
6991
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
7196
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
7373
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...
1
4897
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4583
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3088
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3078
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
649
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
286
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.