i have a web application in vb.2005 with a simple comand button, what code can i put behind the button to make it print the current page, or call up the print dilog box?
Printable View
i have a web application in vb.2005 with a simple comand button, what code can i put behind the button to make it print the current page, or call up the print dilog box?
To show a print dialog you just use:
Me.PrintDialog1.ShowDialog()
vb Code:
private sub lbPrint_Click(s as sender,e as system.EventArgs) { Page.RegisterStartupScript("PrintPage","<script language='javascript'>window.print()</script>") }
The WebBrowser has a .Print function but I've never used it.