Print a web Page (ASP.NET)

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How does one print a web page using ASP.NET?

Normally this VB code would work, but not when running at the server for obvious reasons.

Shell("rundll32.exe C:\Windows\System32\MSHTML.dll, PrintHTML " & """http://www.microsoft.com""", vbNormalFocus)

Even a way of sending ^P to internet explorer would do as the Namespace System.Windows.Forms is unavailable one cannot just use SendKeys.Send("^P")

Please help.

Thank you
 
Dr said:
How does one print a web page using ASP.NET?

Normally this VB code would work, but not when running at the server
for obvious reasons.

Shell("rundll32.exe C:\Windows\System32\MSHTML.dll, PrintHTML " &
"""http://www.microsoft.com""", vbNormalFocus)

Even a way of sending ^P to internet explorer would do as the
Namespace System.Windows.Forms is unavailable one cannot just use
SendKeys.Send("^P")

The javascript method window.print() is one way to do this.
--
Tom Porterfield
MS-MVP MCE
http://support.telop.org

Please post all follow-ups to the newsgroup only.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top