using Upload.Form

Posted on 2006-05-12
Last Modified: 2008-02-01
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("") = 2
objMail.Configuration.Fields("") = "localhost"

objMail.From = ""
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=" & "" & ">" & "" & "</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...

Question by:headbump
    LVL 13

    Accepted 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!

    Author Comment


    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!

    LVL 13

    Expert Comment


    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Join & Write a Comment

    Suggested Solutions

    I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
    This demonstration started out as a follow up to some recently posted questions on the subject of logging in: and…
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
    In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor ( If you're interested in additional methods for monitoring bandwidt…

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now