Click here to Skip to main content
15,898,371 members
Please Sign up or sign in to vote.
4.50/5 (2 votes)
See more:
I am creating a PDF from a web page, from an array. After I get the data, I open a new ASPX page to do all the custom formatting. This works with no issues. The problem is that in the array, after I get the data, I can't loop through the array and open a new page each time.

I use a Response.Redirect to load data to the new page, save as a PDF, and then redirects back to the beginning page without creating additional PDFs from the array data...

Here is a bit of my code:

VB
For Each dataRow As DataRow In tableReferalData.Rows
  Dim ReferralID As String = dataRow.Item(ReferralID).ToString

'blah blah additional code is here

Dim _ReferralSleeve As New ReferralSleeve.ReferralSleeve(ReferralID, leftvert, _
     rightvert, lv_01, rv_01, center_l1, center_l2, center_l3, _
     ls_id1, rv_complete_name, rv_complete_Addr, rv_complete_C_S_Z,_
     rv_complete_phone, bt_line1, bt_line2, bt_line3)

Session(referralsleeve) = _ReferralSleeve


Response.Redirect takes data from the above and builds a web page, I then convert it to a PDF and save it to a directory.

The first PDF builds correctly, but then stops as I can't figure out how to get back to this point from the next page...
Posted
Updated 1-Apr-10 21:11pm
v3

1 solution

Hi,

Open your new page using new window or window.open() that page load your data and login into this to create a PDF.And the control of your original page will be there.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900