?
Solved

how to send content of a text file directly to the default printer not showing the print dialog using ASP.NET

Posted on 2016-10-10
5
Medium Priority
?
36 Views
Last Modified: 2016-10-31
how to send content of a text file directly to the default printer not showing the print dialog using ASP.NET
0
Comment
Question by:sp
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 34

Expert Comment

by:Paul MacDonald
ID: 41837015
Can't be done, as far as I know.  This would be a huge security failure.
0
 

Author Comment

by:sp
ID: 41838544
Could you please elaborate regarding security failure? or please provide alternate solution.
0
 
LVL 34

Accepted Solution

by:
Paul MacDonald earned 2000 total points (awarded by participants)
ID: 41838617
Imagine anyone on any web site being able to force your printer to print something without your intervention.  Huge.  Security.  Failure.

The alternative solution is to bring up the printer dialog via one means or another, often by using the javascript window.print() command.  If you just want to pop the dialog up once the page is loaded you could do something like...

<script language=JavaScript>
window.onload = function () { window.print() };
</script>
0
 

Author Comment

by:sp
ID: 41838621
Thank you. Appreciated!
0
 
LVL 34

Expert Comment

by:Paul MacDonald
ID: 41866591
Closing because the OP didn't and I was prompted to do it for him.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question