problem with merging input type "file" and inout type "text"
problem with merging input type "file" and inout type "text"
am 21.10.2005 21:55:32 von Kevin
Hi,
I downloaded aspsmartupload in order to let the visitors of my site upload
files (their picture in jpg). It works perfect.
But in fact, i need to collect not only their picture, but also name,
address etc ...
So i combined both input types in one form like this:
The ASP code is:
'----------------
Dim mySmartUpload
lol="kevin"
Set mySmartUpload = Server.CreateObject("aspSmartUpload.SmartUpload")
mySmartUpload.Upload
For each file In mySmartUpload.Files
If not file.IsMissing Then
file.SaveAs("/Uploadjpg/" & lol & ".jpg")
end if
next
'-----------------------------
name=request.form("name")
.....
But it doesn't work! (http 500 internal server error)
Any idea how to solve this?
Thanks
Re: problem with merging input type "file" and inout type "text"
am 21.10.2005 22:13:56 von unknown
First of all, make it so that you can actually see your errors:
http://www.aspfaq.com/show.asp?id=2109
Secondly, this isn't really a database problem.
You have to use the upload object's collection of form data to get to the
form data. Look in the sample code for your component, and this will
probably be explained. You'll have to do something LIKE (I DON'T KNOW THE
EXACT WORDING FOR THIS COMPONENT)
"Kevin" wrote in message
news:Ofszkln1FHA.2932@TK2MSFTNGP10.phx.gbl...
> Hi,
>
> I downloaded aspsmartupload in order to let the visitors of my site upload
> files (their picture in jpg). It works perfect.
> But in fact, i need to collect not only their picture, but also name,
> address etc ...
> So i combined both input types in one form like this:
>
> ENCTYPE="multipart/form-data">
> INPUT TYPE="text" NAME="name" >
> ...
>
>
>
>
> The ASP code is:
> '----------------
> Dim mySmartUpload
> lol="kevin"
> Set mySmartUpload = Server.CreateObject("aspSmartUpload.SmartUpload")
> mySmartUpload.Upload
> For each file In mySmartUpload.Files
> If not file.IsMissing Then
> file.SaveAs("/Uploadjpg/" & lol & ".jpg")
> end if
> next
> '-----------------------------
> name=request.form("name")
> ....
>
> But it doesn't work! (http 500 internal server error)
> Any idea how to solve this?
> Thanks
>
>
Re: problem with merging input type "file" and inout type "text"
am 21.10.2005 23:39:13 von Kevin
Thanks a lot. It works now ...
"Ray Costanzo [MVP]" wrote in
message news:edTJ4vn1FHA.3892@TK2MSFTNGP12.phx.gbl...
> First of all, make it so that you can actually see your errors:
> http://www.aspfaq.com/show.asp?id=2109
>
> Secondly, this isn't really a database problem.
>
> You have to use the upload object's collection of form data to get to the
> form data. Look in the sample code for your component, and this will
> probably be explained. You'll have to do something LIKE (I DON'T KNOW THE
> EXACT WORDING FOR THIS COMPONENT)
>
> Someformvalue = YourUploadObject.Form("nameofinput")
>
> Ray at work
>
> "Kevin" wrote in message
> news:Ofszkln1FHA.2932@TK2MSFTNGP10.phx.gbl...
> > Hi,
> >
> > I downloaded aspsmartupload in order to let the visitors of my site
upload
> > files (their picture in jpg). It works perfect.
> > But in fact, i need to collect not only their picture, but also name,
> > address etc ...
> > So i combined both input types in one form like this:
> >
> > ENCTYPE="multipart/form-data">
> > INPUT TYPE="text" NAME="name" >
> > ...
> >
> >
> >
> >
> > The ASP code is:
> > '----------------
> > Dim mySmartUpload
> > lol="kevin"
> > Set mySmartUpload = Server.CreateObject("aspSmartUpload.SmartUpload")
> > mySmartUpload.Upload
> > For each file In mySmartUpload.Files
> > If not file.IsMissing Then
> > file.SaveAs("/Uploadjpg/" & lol & ".jpg")
> > end if
> > next
> > '-----------------------------
> > name=request.form("name")
> > ....
> >
> > But it doesn't work! (http 500 internal server error)
> > Any idea how to solve this?
> > Thanks
> >
> >
>
>