kbraju76
asked on
Print web page using asp.net
Hi Expert,
I have a print button on my aspx page. When the user clicks on the print button, without opening printer-friendly version need to go straight to the printer. user doesn't need to first click view, then click printer-friendly version button.
Can anyone please help me how can i do this using asp.net and vb.net.
Your help is much appreciated
Raju.
I have a print button on my aspx page. When the user clicks on the print button, without opening printer-friendly version need to go straight to the printer. user doesn't need to first click view, then click printer-friendly version button.
Can anyone please help me how can i do this using asp.net and vb.net.
Your help is much appreciated
Raju.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You can use this sub to do the printing:
Public Sub Print()
System.Web.HttpContext.Cur
System.Web.HttpContext.Cur
System.Web.HttpContext.Cur
End Sub
Then anytime you want to print the screen you just call this in your code:
Print()