Passing variables to ASPupload page

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • zannoossi
    New Member
    • Apr 2012
    • 1

    Passing variables to ASPupload page

    Is there any way an ASP upload page (ASPupload.asp) can read request.form variables passed from the previous page (pre_upload.asp ) when the form action on the pre_upload.asp page is action="ASPuplo ad.asp". I have tried everyway I can think of with no success. I could use session variables or cookies but wanted to avoid these methods if possible
  • jhardman
    Recognized Expert Specialist
    • Jan 2007
    • 3405

    #2
    yeah, this shouldn't be a problem. what have you tried so far?

    If I am stymied with a form post, I like to put this snippet near the top of the page. This just prints out everything posted from the form:
    Code:
    <table border="1"><tr><th colspan=2>Request.querystring</th></tr>
    <tr><th>Name</th><th>Value</th></tr>
    <%
    for each x in request.querystring
       response.write "<tr><td>" & x & "</td><td>" & request.querystring(x) & "</td></tr>" & vbNewLine
    next 
    %>
    </table>
    
    <table border="1"><tr><th colspan=2>Request.form</th></tr>
    <tr><th>Name</th><th>Value</th></tr>
    <%
    for each x in request.form
       response.write "<tr><td>" & x.name & "</td><td>" & request.form(x) & "</td></tr>" & vbNewLine
    next 
    %>
    </table>
    notice that some forms post as querystring, and some post as form, this script lists everything that was posted as both.

    Jared

    Comment

    Working...