Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how can I upload a file and some text from the same form or same page

Status
Not open for further replies.

roblasch

Programmer
Dec 30, 2000
168
0
0
US
I want to upload some information, name, description, file path, etc into a database. Then I want to upload an image with it. The image just goes on the server and I can do that with their software(ASP simple Upload). The problem is that the form needs enctype="multipart/form-data" for the image file, then I can't access the rest of the information without a bunch of parsing, which I really don't know much about. Is there a way to submit one form to the originating page without refreshing the selection in the file input? Or is there a way to submit both forms from a javascript function? Or can you help me figure out how to decode the rest of the info if it is all uploaded with the image.
 
I have done that this way

I collect the info with something kike

session("pathnomimage") = UploadRequest.Item("nomimage").Item("Value")

and after the upload page

redirect to a page that insert the info into de db retrieving the session information
 
I had good luck with a dll component that I picked up at freevbcode.com -- aspupload. It comes with sample asp pages and documentation. To access the form data you use the objects provided by the component. The syntax is something like oUpload.Form("formfield").
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top