...

View Full Version : upload.form



andyc209
03-14-2006, 04:30 PM
I have a file upload form with the following form

<form method="POST" enctype="multipart/form-data" action="Insert.asp">
<input type="hidden" name="user" value="<%=request("user")%>" />
<input type="hidden" name="policy" value="<%=request("policy")%>" />
<input type="file" name="file" /><input type="submit" name="Submit" value="Submit" class="bodytext">
</form>

in the insert page i submit the file but when I try to redirect when finshed to a page using the user and policy values it failed. I found out that i need to use upload.form not request("value") but I am still getting an error...
the redirect is:

Response.redirect "index.asp?user="& Upload.form("user")&"&policy="& Upload.form("policy") &""

the error is object required " at the above line

can anyone see why

miranda
03-14-2006, 10:40 PM
Without seeing the code that is on the page, I would have to ask did you close the upload object before that line of code? My guess is yes, you did.

Also you will have better performance to not go through the upload collection multiple times. Declare some variables and assign the values form the upload collection to them, then use the variables in the places where you have upload.form("")

Dim sUser, sPolicy
sUser = upload.form("user")
sPolicy = upload.form("policy")

Response.redirect "index.asp?user="& sUser & "&policy=" & sPolicy



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum