473,573 Members | 2,863 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Printing Client side in ASP.NET

Hi All,
I have a web form. let's say it has 3 fields. Employee No, Name ansd
salary. Now my problem is I want to print the contents of this screen
to a local printer. Note that this is client side printing and not
server side!!
I do not want to print the screen but the contents of the screen
(Employee No, Name and salary).
Also is there a way that the printer dialog will not appear while
printing.

Thanks in advance!!

Regards
Anil

Nov 17 '05 #1
3 3210
Anil,

Because it is a webform, you could use stylsheets (css) for this.
A quick search led me to this site:
http://css-discuss.incutio.com/?page=PrintStylesheets

HTH
Christiaan

<an********@gma il.com> schreef in bericht
news:11******** **************@ g44g2000cwa.goo glegroups.com.. .
Hi All,
I have a web form. let's say it has 3 fields. Employee No, Name ansd
salary. Now my problem is I want to print the contents of this screen
to a local printer. Note that this is client side printing and not
server side!!
I do not want to print the screen but the contents of the screen
(Employee No, Name and salary).
Also is there a way that the printer dialog will not appear while
printing.

Thanks in advance!!

Regards
Anil

Nov 17 '05 #2
an********@gmai l.com wrote:
Hi All,
I have a web form. let's say it has 3 fields. Employee No, Name ansd
salary. Now my problem is I want to print the contents of this screen
to a local printer. Note that this is client side printing and not
server side!!
I do not want to print the screen but the contents of the screen
(Employee No, Name and salary).
Also is there a way that the printer dialog will not appear while
printing.

Thanks in advance!!

Regards
Anil


As Christiaan said, you can use css to specify what content should be
hidden from the printer.
It is not possible to print client-side without that print-dialog, it's a security
feature. Imagine what would happen if some of the "less polite" sites
where able to print anything without you being able to stop it!

Hans Kesting
Nov 17 '05 #3
All you have to do is wrap the fields inside a div tag, then send the div
tag to a client side script and call InnerHTML method of div tag to send to
new window. This is really a client-side scripting issue.

<an********@gma il.com> wrote in message
news:11******** **************@ g44g2000cwa.goo glegroups.com.. .
Hi All,
I have a web form. let's say it has 3 fields. Employee No, Name ansd
salary. Now my problem is I want to print the contents of this screen
to a local printer. Note that this is client side printing and not
server side!!
I do not want to print the screen but the contents of the screen
(Employee No, Name and salary).
Also is there a way that the printer dialog will not appear while
printing.

Thanks in advance!!

Regards
Anil

Nov 17 '05 #4

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

Similar topics

2
6162
by: Ryan Moran | last post by:
Hi, I am writing a ASP.NET application using VB.NET and everything is hunky dorey except for one thing. I am having real problems printing to a printer on the client side. I need to be able to send escape characters to a printer and I was able to do this no problem on the server side with a VB.NET application. however, I have no clue...
7
8420
by: ap | last post by:
Hi, It is a quick question... Is that impossible to print the page(Web Form .aspx file) in client side using GDI+ like PrintDocument pd = new PrintDocument(); pd.print(); As I know it is a server side printing... and is that possible to make it to client side printing or it must be printed using javascript??
6
2286
by: Darren | last post by:
Guys, Based on selection in a datagrid,I need to retrieve info to construct a letter from a table in my database and send it off for printing.Now the thing is there may be a few hundred letters to be printed.How do I accomplish this in ASP.NET Any examples/links would be appreciated
1
1788
by: Jurjen de Groot | last post by:
I will be developing a new web-app (ASP.NET), this web-app needs to be able to print invoices, letters, forms, etc. to specific printer(s) on the client's pc. I know that one could create a printable page in the browser and call window.print() using javascript but this way the end-user still has to select a printer and click Ok to start...
4
2183
by: Russ | last post by:
To ASP.NET printing experts: My Asp.net web form needs to print some reports at the client side. I've been trying to research this and find some confusing and conflicting information in previous news group answers. Some say "Crystal Reports", others say "PDF" or "Word", and others say that you cannot do this at all on client side??? My...
2
3586
by: cFleury | last post by:
Hello, I am new to ASP.NET and I have to print an invoice from an application written in ASP.NET, I have followed most of the threads in this newsgroup about the dificulties posed by the server side nature of ASP.NET, but nobody really addressed a solution to the problem, can I use "Crystal Reports" which comes with Visual Studio to do it ?...
2
1372
by: Jacek | last post by:
I'm developing ASP.NET C# application. I need to implement server-side printing for asp.net form on specified in DB printer. I know how to print it on Client-side (window.print()). How can I print the same page (form) on server side? If I can use PrintDocument class, then how to pass dynamically generated web form. If I have to use...
2
2877
by: Jurjen de Groot | last post by:
I'm about to start a new ASP.NET application, this application will generate several types of documents (PDF HTML XML-DOC) wich have to be printed at the client-side... (probably on different printers A3 and A4 type) At this time I'm trying to figure out what would be the best way to accomplish this : 1. printing through HTML in a IE...
18
11271
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 classes, for each of the checked rows in the GridView. This works fine in the Visual Studio 2005 development environment on localhost. But, when I...
0
7784
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
8031
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8204
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7795
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
1
5600
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5294
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3735
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2223
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 we have to send another system
0
1044
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.