473,763 Members | 7,044 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Print directly in IE without prompting user

I have a asp.net page, it uses js to print in IE.
It always has the prompting user window appear.

I have tried:

<input onclick="docume nt.all.WebBrows er.ExecWB(6,6)" type="button"
value="Print directly">

<input onclick="docume nt.all.WebBrows er.ExecWB(6,2)" type="button"
value="Print directly">

All didn't work.
For example:
http://topic.csdn.net/t/20060509/01/4737530.html
http://blog.chinaunix.net/u1/51862/showart_435050.html
http://msdn.microsoft.com/en-us/library/ms683930.aspx

OLECMDEXECOPT_D ONTPROMPTUSER = 2,

How to avoid this prompt window?

Thanks,
-Billy

Aug 5 '08 #1
3 3284
Hi

All you can do is to build a separate printer friendly page and onload
use window.print to popup the print dialog...
but avoiding the dialog... not sure if possible ...

regards

Munna
Aug 5 '08 #2
"Munna" <mu******@gmail .comwrote in message
news:be******** *************** ***********@x41 g2000hsb.google groups.com...
but avoiding the dialog... not sure if possible ...
Not natively - all modern browsers are designed specifically to prevent this
sort of direct interfacing with client hardware and software, for fairly
obvious security reasons...
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Aug 5 '08 #3
Hi Billy,

As for printing in web page via client script, it is quite restricted due
to browser's security model, it won't allow silent print via script.
Generally, we only have the "window.print() " function to let user
interactively print the current active document in the browser. For those
cases that we need more control over the printing in webpage, we may
consider some rich client approach such as ActiveX control(require the
client-side to allow running of the activex).

Sincerely,

Steven Cheng
Microsoft MSDN Online Support Lead

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsof t.com.

=============== =============== =============== =====
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.
=============== =============== =============== =====
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
>From: =?Utf-8?B?QmlsbHkgWmh hbmc=?= <ht****@noemail .noemail>
Subject: Print directly in IE without prompting user
Date: Tue, 5 Aug 2008 03:07:04 -0700
>I have a asp.net page, it uses js to print in IE.
It always has the prompting user window appear.

I have tried:

<input onclick="docume nt.all.WebBrows er.ExecWB(6,6)" type="button"
value="Print directly">

<input onclick="docume nt.all.WebBrows er.ExecWB(6,2)" type="button"
value="Print directly">

All didn't work.
For example:
http://topic.csdn.net/t/20060509/01/4737530.html
http://blog.chinaunix.net/u1/51862/showart_435050.html
http://msdn.microsoft.com/en-us/library/ms683930.aspx

OLECMDEXECOPT_D ONTPROMPTUSER = 2,

How to avoid this prompt window?

Thanks,
-Billy

Aug 6 '08 #4

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

Similar topics

3
338
by: yfng | last post by:
I am doing a web project. Is there any method to print web pages with support of page breaks and without printer prompt diaglog e.g.like window.print() (or close immediately) by just clicking a button on the webpage? Thank you very much.
6
2906
by: Dennis Allen | last post by:
Hi. On one particular web page I want to offer the user a print button. Question. How do I create one? Something compatible with most browsers would be nice. Appreciate any advice...Dennis
2
1951
by: Yuriy | last post by:
Hello! I need to print PDF Document by clicking a button on .aspx page. The PDF should be printed on client printer without displaing it on the window. I tried Process namespace but it doesn't work. Please, help! Thank you.
4
2365
by: rom | last post by:
I need to print a html table when the user clicks on a key. the problem is that i don't want the printer dialog box to appear. i guess this is impossible in javascript so i think to create an event that will be fired by a keyup event, this event will submit the page, and i will be able to print in from the vb.net without the printing dialog box. the problem is that on the server i can't print the web table because i already submitted that...
7
4915
by: mattmerc | last post by:
Hi all, We have all seen lot of method for exporting datagrids to Excel. I have a slightly different need. I think it should be easy to accomplish but I am not sure how. I would like when a user clicks a button for exporting a datagrid, that the excel file is saved on the server and that it DOES NOT prompt the user to open or save. Here is the code I am using for standard export that prompts the user. Thanks all. Dim...
1
1316
by: Alba López | last post by:
Hi, I want to print a webform directly to the default printer, without showing the user the print dialog box. I used to do it with window.open and it worked as I wanted to, but after installing Service Pack 2, the dialog box appears and I don't know what to do to "remove" it. Thanks a lot. Alba ;)
1
3192
by: Sam | last post by:
Hi All I have a web page that contains a datagrid and in this data grid, I have a checkbox column template which allow user to select one or more applicant's loan applicantion to print. Currently I have to loop thru the list of applications and call an aspx page to load each application and use a javascript "window.print" function to pop-up the print dialog; and user has to click on the print button to print This appearantly becomes a...
4
2497
by: Jamey Shuemaker | last post by:
A2k2 with user-level security and all preventive measures, vis a vis, Security FAQ enabled or enacted. I've got three DBs, which due to size constraints can't, or rather, probably shouldn't be combined. All have front-end on C: drive, back-end in same folder on network share. All are secured with the same ..mdw. I'd like to make a master file that gives the user one single jumping off point to link to the other apps. I can accomplish...
7
11405
by: pamela fluente | last post by:
hi, What is the cleanest and effective way to use the PrintDocument object to print directly to a pdf file "myfile.pdf" (with no prompt to the user: just print to file and make pdf) ? Does anyone have a simple code snippet? Either VB or C# will be perfect.
0
9563
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10144
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...
1
9937
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
9822
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8821
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...
0
6642
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
5405
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3917
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
3
2793
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.