I am working on an ASP.Net application using VB.

My main window contains a datagrid which allows multiple records to be selected. When I click on a print button I want to open a new window passing a string compiled from the records that have been selected in the datagrid. In the new window, I am using a third party software called PDFPrint to print the selected items. The one thing that I have run into with PDFPrint is that the code to trigger it seems to only work properly if coded in the html section. I looked at adding it to the code behind, but there doesn't appear to be any way of adding PDFPrint as a reference.

When I select the print button from the main window I want to do three things.
The first is gather all of the records selected.
Next I want to reset the selected records in the datagrid so that none are selected.
The third thing I want to do is open a new window which will use the parameter string to print the selected records.

When the printing is completed and I close the window, I would like to return to the main window at the same location in the datagrid that I was at when I called the new window.

Does anyone have any tips or suggestions as how to do this?

Thanks for your help,