473,509 Members | 3,039 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to Print a WebPage ?

2 New Member
Hi,
am using c#.net. could any one tell me how to print a web page..
Thanks in advance
Mar 31 '10 #1
1 1513
Frinavale
9,735 Recognized Expert Moderator Expert
You cannot print a web page using C#.
In ASP.NET your C# code is executed on the server in order to generate HTML which is sent to the browser so that the browser can display the page.

In order to let a user print a page you are going to have to implement something client-side (that runs in the browser).

To do this you should use JavaScript. The JavaScript print() method.

Another thing to keep in mind is that your website may be using lots of images and colours that a user may not want to be printed (it's a waste of ink etc). You can specify how your web page should look when it is printed using a CSS style sheet that is for media type: print.

In other words, you can show your web page in full colours and graphics but when the user prints the page it only prints the content and hides the graphics etc.

-Frinny
Mar 31 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
7375
by: Martin Foster | last post by:
Hi. I want to do something really simple. I want to be able to write a custom SQL query in a textbox on a webpage, submit it and then output to the webpage in the format of MySQL output i.e....
1
1768
by: Rajah | last post by:
I have a webpage which I need to format for printing. The webpage contains a Confirmation and an Acknowledgement. Users should be able to print the Confirmation and the Acknowledgement separately....
7
3679
by: gino | last post by:
Dear all, My monitor was set to 1600x1200 so the fonts in IE is too small for me even when I set the "View->Text Size->Largest"... I don't have previlage to change the monitor resolution... ...
2
8157
by: Jurjen de Groot | last post by:
I would like to implement a button which will, upon click, print the current webpage. I have no idea where to begin, I think I need some sort of client scripting but I suppose there's a simple...
0
1246
by: Kresten Buch | last post by:
Hi, I have a central webapplication with lots of clients connected to it over the internet, and some of theese clients has to do a lot of printing. This is where the fun begins. One client...
1
1184
by: kumar | last post by:
Hello every one, Can any one help me how can i print values of my webpage with just a button in the webpage. From http://www.developmentnow.com/g/8_0_0_0_0_0/dotnet-framework-aspnet.htm ...
3
1151
by: Larry | last post by:
I'm developing a web app. Is it possible to allow the user to just click once, and have my app fetch many image files from the server and print them all on the user's printer (with no further user...
1
1630
by: eqiz | last post by:
I'm looking for a way to print stuff from my program. I have searched and searched for a way to print and the only thing I have found is PrintFORM which only takes a picture of the form and prints it...
2
1176
by: DhanyaSandeep | last post by:
I have a customer biling page in Asp.net.I want to print that webpage on a button click.How can I do that? I tried with Print Document, but the result is that when i clicked the button the printer...
1
1725
by: chaitanya02 | last post by:
Hi, Do anyone know how to add an print or scan button on a webpage-asp. I have a webpage like a agreement page, which when an user clicks should agree to download something. How can I add a...
0
7136
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
7344
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
7412
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
7505
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
5060
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
3216
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
1570
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
775
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
441
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.