Forums

This topic is locked

Pass a Session variable with Pure File Upload

Posted 02 Jan 2008 16:47:39
1
has voted
02 Jan 2008 16:47:39 bill charrette posted:
I’ve read all the replies for this article and still cannot pass a Session variable from one page to another when applying the Pure File Upload

I am using Dreamweaver: 8.02, Pure ASP Upload 3, ASP VB Script

I understand that after you use the Pure ASP Upload you can't use the Request.Form collection. There fore I am using the UploadFormRequest(..) instead.

The following code is placed on the upload page (after all the asp code - before the html code per your instructions at www.dmxzone.nl/showDetail.asp?TypeId=7&NewsId=1707):


If (CStr(Request.QueryString("GP_upload") <> "" Then
New_redirectPage = "newsletter_added.asp" 'Set the new redirect page

'Set our session, cookie or other variables from the form submissions

Session("sessNewsletterFrom" = UploadFormRequest("NewsletterFrom"
Session("sessNewsletterPrivacyType" = UploadFormRequest("NewsletterPrivacyType"
Session("sessNewsletterSubject" = UploadFormRequest("NewsletterSubject"
Session("sessNewsletterMessage" = UploadFormRequest("NewsletterMessage"
Session("sessNewsletterAttachment1" = UploadFormRequest("NewsletterAttachment1"
Session("sessNewsletterAttachment2" = UploadFormRequest("NewsletterAttachment2"
Session("sessNewsletterAttachment3" = UploadFormRequest("NewsletterAttachment3"

'Redirect the page if we have set the above variable
If New_redirectPage <> "" Then
Response.Redirect(New_redirectPage)
End If

End If




The following code is placed on the redirect page (per your instructions at www.dmxzone.nl/showDetail.asp?TypeId=7&NewsId=1707):


'These are used to check for correct values
'Remove or comment then out after checking!

Response.Write "NewsletterFrom: " & Session("NewsletterFrom"
Response.Write "NewsletterSubject: " & Session("NewsletterSubject"
Response.Write "NewsletterPrivacyType: " & Session("NewsletterPrivacyType"
Response.Write "NewsletterMessage: " & Session("NewsletterMessage"
Response.Write "NewsletterAttachment1: " & Session("NewsletterAttachment1"
Response.Write "NewsletterAttachment2: " & Session("NewsletterAttachment2"
Response.Write "NewsletterAttachment3: " & Session("NewsletterAttachment3"

Response.End






Any help would be greatly appreciated

Thanks Bill

Reply to this topic