473,666 Members | 2,634 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Printing from ASP.NET1.1

I'm not sure if this is even possible, but the scenario is this:

I have a web page which will have options for printing different kinds of
form letters (think dropdown list). Once a letter is selected and a "Print"
button is clicked, I need to be able to bring up a Print Dialog to let the
user select a printer. Then, I need to send the print data to the printer.
The catch here is that I don't want to have to show the letters, I would
just like to send the text/html to the printer once the type of letter and
printer has been chosen.

Is this possible? How would I go about doing this?

Thanks!
May 30 '06 #1
2 989
Well, I don't know if there is a way to do what you want using only ASP.NET
(I think you would need something like an ActiveX control or something), but
here is a workaround that uses just ASP.NET and JavaScript. Create another
page that has the following body tag:

<body onLoad="window. print();window. close();">

This page will have the content (and only the content) you want printed.
When the user clicks the print button on the page they selected the form
from, this page will open IN ANOTHER WINDOW. after it opens, they will see
the print dialog, select the printer, and then the window will close,
therefore having the page get printed, but they will never have to manually
open or close the extra window. If you want to go the extra mile, you could
also add JavaScript to make the window as small as possible so that they
don't even notice that another window opened, like the following:

<body onLoad="window. resizeTo(0,0);w indow.print();w indow.close();" >

This is what I do when I don't want any extra buttons or controls printed
with a page on my site, so you can see how well it works for you. Good Luck!
--
Nathan Sokalski
nj********@hotm ail.com
http://www.nathansokalski.com/

"karch" <no****@two.com > wrote in message
news:%2******** ********@TK2MSF TNGP03.phx.gbl. ..
I'm not sure if this is even possible, but the scenario is this:

I have a web page which will have options for printing different kinds of
form letters (think dropdown list). Once a letter is selected and a
"Print"
button is clicked, I need to be able to bring up a Print Dialog to let the
user select a printer. Then, I need to send the print data to the printer.
The catch here is that I don't want to have to show the letters, I would
just like to send the text/html to the printer once the type of letter and
printer has been chosen.

Is this possible? How would I go about doing this?

Thanks!

May 30 '06 #2
Excellent idea...I'll give it a try!

Thanks!

"Nathan Sokalski" <nj********@hot mail.com> wrote in message
news:ei******** ******@TK2MSFTN GP04.phx.gbl...
Well, I don't know if there is a way to do what you want using only ASP.NET (I think you would need something like an ActiveX control or something), but here is a workaround that uses just ASP.NET and JavaScript. Create another
page that has the following body tag:

<body onLoad="window. print();window. close();">

This page will have the content (and only the content) you want printed.
When the user clicks the print button on the page they selected the form
from, this page will open IN ANOTHER WINDOW. after it opens, they will see
the print dialog, select the printer, and then the window will close,
therefore having the page get printed, but they will never have to manually open or close the extra window. If you want to go the extra mile, you could also add JavaScript to make the window as small as possible so that they
don't even notice that another window opened, like the following:

<body onLoad="window. resizeTo(0,0);w indow.print();w indow.close();" >

This is what I do when I don't want any extra buttons or controls printed
with a page on my site, so you can see how well it works for you. Good Luck! --
Nathan Sokalski
nj********@hotm ail.com
http://www.nathansokalski.com/

"karch" <no****@two.com > wrote in message
news:%2******** ********@TK2MSF TNGP03.phx.gbl. ..
I'm not sure if this is even possible, but the scenario is this:

I have a web page which will have options for printing different kinds of form letters (think dropdown list). Once a letter is selected and a
"Print"
button is clicked, I need to be able to bring up a Print Dialog to let the user select a printer. Then, I need to send the print data to the printer. The catch here is that I don't want to have to show the letters, I would
just like to send the text/html to the printer once the type of letter and printer has been chosen.

Is this possible? How would I go about doing this?

Thanks!


May 30 '06 #3

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

Similar topics

3
1312
by: Ben Wan | last post by:
I've got Visual studio 2002 (Version 7.0.9466) with .Net 1.0 Framework). How can I upgrade my .Net version to 1.1 without buying the newer Visual Studio (2003)?
2
1269
by: bb | last post by:
i use the losformatter to serialise a hashtable and the store in the database. (i save some urls so they can be reconstructed) we have moved the project from asp.net1 to asp.net2 now whenever i try and deserialize a token that was saved to the db before the move to asp.net2 it fails with error 'unable to deserialise' i am also noticing that the serialised values look completely different.
55
2706
by: Steven Nagy | last post by:
Hi all, Sorry I have no time to test this myself.... Can I add the same attribute to a field twice? Eg. Public string myField;
4
2514
by: hvj | last post by:
I need to run a .NET1.1 program in a .NET2.0 CLR. The .NET1.1 exe starts correctly in .NET2.0. Now I want to debug in Visual Studio 2005. But when I try to open the .NET1.1 project, Visual Studio wants to convert it to .NET2.0 what I don't want. How can I make Visual Studio open a .NET1.1 project for me in order to attach to a .NET2.0 process in which it runs to debug it? Or is there a better way to reach my goal: debugging a .NET1.1...
1
5947
by: Rune Jacobsen | last post by:
Hi all, I have some often-performed tasks in my applications that I want users to be able to specify hotkeys for. However, I don't want to hard code these hotkeys, as sooner or later some other app is bound to use the same thing, causing end user frustration. So I want the end user to be able to specify the hot key to use for task X in the configuration window. Now receiving and handling the hotkey is no problem. I do that easily...
3
1412
by: Marcus | last post by:
Hi, I converted my .Net1.1 application (written in VS2003) to a .Net2.0 application. I let VS2005 do the job as it suggested when trying to load my VS2003 project in VS2005. I then included the output exe from this project into my VS2005 setup project. I used it as a custom action. I then built the whole thing and installed it.
4
2275
by: jayfeb29 | last post by:
Hi , Any one can guide me in Import the Excel 2002 data into sql server 2000 using ado.net1.1. I have searched all the forums most of the solutions end with a line of suggestion not with any code . here is my code . by using OLEDB JET I got the data from Excel to data set , the data is in the data table OleDbConnection strConn = new OleDbConnection ("Provider=Microsoft.Jet.OLEDB.4.0;data source= c:\\1005.xls;Extended...
0
1147
by: jbrooksga | last post by:
Hello, First of all I know nothing about programming. Recently had to install .Net1.1 on my W2K server to support an application I had purchased. The .Net1.1 was installed as part of the process with my new application. Everything seemed to be fine. But now, my IIS SMTP server will not send email at all. Messages go into the queue, but will not be sent. I get constant event logs
4
1615
by: =?Utf-8?B?TmFkYXYgUG9wcGxld2VsbA==?= | last post by:
Hi everybody, I've got an ASP.NET 1.1 application and I need to add to it new Browser Capabilities information for 3 new cellular phones. I used to use http://www.asp.net/mobile/profile/MyDevices.aspx to detect the Browser Capabilities for my devices, but now I can't get to that page. When I try to get there I get a login page. When I try to login it shows the same login page WITHOUT any error. I've got an account in www.asp.net (when...
0
8863
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8780
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7378
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6189
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5661
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4192
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4358
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2765
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
2
2005
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.