1

I have seen examples of printing from a windows application but I have not been able to find a good example of any way of doing this.

Haacked
  • 58,045
  • 14
  • 90
  • 114
WACM161
  • 1,013
  • 2
  • 9
  • 20
  • What do you mean print screens ? If you want to print the page, asp.net or not, it's up to the browser to do that. – thomasb Sep 17 '08 at 12:40

4 Answers4

1

I've used the print style sheet

here's and article http://alistapart.com/stories/goingtoprint/ that will go through the way to set that up. Rather than setting up a special page that would need to be maintained as well.

osp70
  • 1,062
  • 1
  • 12
  • 19
0

If you just need to print your web page from the client-side use window.print(). Sample could be found here: http://www.javascriptkit.com/howto/newtech2.shtml. I would suggest preparing a special version of your page first with no dynamic content and with a layout which would look nice on print.

If you need to send something to printer on the server-side that would be a little bit more complicated. Check out this MSDN article on how to do the basic printing.

Ilya Kochetov
  • 17,988
  • 6
  • 44
  • 60
0

The browser prints your pages. If you need to tweak the page so it looks better on the printer, use CSS @media selectors.

Joel Coehoorn
  • 399,467
  • 113
  • 570
  • 794
0

Restating what others have said, you just need to call window.print() in javascript. That and build a separate css for print.

CodeRot
  • 893
  • 6
  • 12