Posted on: 3/6/2014 5:38:43 PM | Views : 672

Hi All,
I have some code that creates a pdf file in a server location on button click. Now I would like to generate a popup window of that document and print it. Is there a way to call javascript on the button click?
I can only come up with adding a second button and assigning javascript with the server location on click to the second button.
For Example:
Protected Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click Dim Location As String = "N:\\shrdata\\Public\\Prodjobs\\DailyTradeTickets\\2014\\dt140305.105459.pdf" Button2.OnClientClick = "window.open('" + Location + "', 'PDFPOPUP', 'width=500,height=600');window.print();return false;" End Sub  Any other ideas to print a document on button click besides using javascript will help too. Thank you!

Go to the complete details ...