• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 250
  • Last Modified:

using Upload.Form

Hey all,

I have a page with a form which submits to a page which uses ASP upload and sends mail from the same page. My problem is that ASP upload wants the page to use Upload.Form instead of Request.Form...this seems to work well for my sending mail...I can grab values from the form that has been submitted using Upload.Form this way, but when I attempt to do that in the ASP upload object (to pass the path), it isn't reading it...

It will read a recordset field, but when I try to create a rs which uses the upload.form to filter, it freaks out...and of course ASP upload freaks when I switch the filter to Request.Form...

What am I doing wrong here and what can I do?


Set Upload = Server.CreateObject("Persits.Upload")
Upload.ProgressID = Request.QueryString("PID")
Count = Upload.SaveVirtual("upload_preview/" & Upload.Form("strCustomerFolder").Value)

Set objMail = Server.CreateObject("CDO.Message")

objMail.Configuration.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
objMail.Configuration.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "localhost"

objMail.From = "preview@copy-king.com"
objMail.To = rsCustomer.Fields.Item("strCustomerEmail").Value
objMail.Subject = Upload.Form("strCustomerFolder") & "Your File(s) are ready for Preview."

objMail.HTMLBody = "<font size=2 face=verdana>"
objMail.HTMLBody = objMail.HTMLBody & "Notes:" & Replace(Upload.Form("txtNotes"), vbCrLf, "<br />")  & "<br>" & "<br>"
objMail.HTMLBody = objMail.HTMLBody & "Sent by " & "<strong>" & "Copy King" & "</strong>" & "<br><br>"
objMail.HTMLBody = objMail.HTMLBody & "<strong>" & "Project: " & "</strong>" & Upload.Form("strProject") & "<br><br>"
objMail.HTMLBody = objMail.HTMLBody & "To review your file(s), login to: " & "<a href=" & "http://www.copy-king.com/customer_login.asp" & ">" & "http://www.copy-king.com/customer_login.asp" & "</a>" & "</strong>" & " Thank you!" & "<br><br>"
objMail.HTMLBody = objMail.HTMLBody & "Sent at " & Now() & "</font>"


Set objMail = Nothing


Again, in the code above, the mail works, but the upload does not...

  • 2
1 Solution
Have you tried to comment out this line?
Upload.ProgressID = Request.QueryString("PID")

To identify what exactly is inside the Upload object:
For Each Item in Upload.Form  
    Response.Write Item.Name & "=" & Item.Value & "<BR>"

Perhaps one of those two suggestions will shed some light on the problem!
headbumpAuthor Commented:

Actually I ended up using another page to pass the customer value and then turned it into a session variable and grabbed it that way, but I did have to identify what was being passed and not passed.

Thanks for the response!


Featured Post

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now