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
23 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
  • 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 500 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

Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

Question has a verified solution.

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

Suggested Solutions

It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

828 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