Click to See Complete Forum and Search --> : ASPUpload: Multiple form submitals in a multipart/form-data form.


TonyLoco23
03-09-2009, 04:24 PM
I have just started using ASPUpload and all I can say is that for a ready-made solution, it is extremely difficult to use!

I am trying to create a form that asks various questions in option boxes and allows users to submit an image file. Obviously I do not want the image to be submitted to the host until the user has answered all the questions on the form and pressed the last button that says "submit image"

Some of the option boxes need to submit the form.

However when the user clicks on one of these option boxes, the image gets uploaded! This is because I have not worked out how to make the code sample that processes the image (from ASP upload) conditional on whether or not the final button is pressed.

Normally I would use:


if request.form("UpImg") = "Upload New Image" then
*Process and upload the image
end if


But they (ASPUpload) say you have to use:


if upload.form("UpImg") = "Upload New Image" then
*Process and upload the image
end if


But this does not work either, if I put this in before the upload.save method, it stops ALL of the form objects (both the option boxes and the final button) from submitting the form, if I put it in after the upload.save method the image has already been saved anyway so its pointless.

Any ideas how to get around this problem? I thought about putting all my option boxes in a different form on the same page, but I am not sure that I can have forms written within another form??

zahidraf
03-10-2009, 12:36 AM
When you are using asp.upload componet the other form element wil not work you have to use their own form name and way to get the varaible values .

check their manual there is way and they infom how to acess those varaible.


Mac Book Wheel (http://www.zahipedia.com/2009/01/08/mac-notebook-now-with-a-wheel/)

TonyLoco23
03-10-2009, 07:46 AM
I am afraid that their manual is simply a set of tutorial examples, and they neglected to give a single example of how to upload a photo in a form that has more than one form submit trigger.

I have also done a google search for other Asp Upload samples, but I did not find anything.

Kuriyama
03-10-2009, 09:06 AM
ASPUpload is a good attempt for an upload script for a language that really doesn't support it.

I would use .NET for this. Remember that if you are running ASP classic, by default you can .NET. ASP classic and .NET for the most part intermingle well, and it's much easier to upload files to a webserver using .NET