How to auto fire key combination Ctrl+P from asp.net code ?
Asked
Active
Viewed 3,635 times
2 Answers
2
In Javascript: window.print();
https://developer.mozilla.org/en-US/docs/Web/API/window.print
To my knowledge, it's not actually standard, though people have been using it for a really long time. seealso: cross-browser print command?
0
The fastest way will be a button with the javascript function window.print()
:
In your asp.net markup:
<asp:Button ID="printButton" runat="server" Text="Print" OnClientClick="javascript:window.print();" />
For more information you can look at this page or have a look at this code project site there are different solution to print sites

Martin
- 3,096
- 1
- 26
- 46