problem with merging input type "file" and inout type "text" - Inetserver

This is a discussion on problem with merging input type "file" and inout type "text" - Inetserver ; 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 ...

+ Reply to Thread
Results 1 to 3 of 3

problem with merging input type "file" and inout type "text"

  1. Default problem with merging input type "file" and inout type "text"

    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:
    <FORM METHOD="POST" ACTION="testuploadb2.asp" ENCTYPE="multipart/form-data">
    INPUT TYPE="text" NAME="name" >
    ....
    <INPUT TYPE="FILE" NAME="FILE1" >
    <INPUT TYPE="SUBMIT" VALUE="Upload">
    </FORM>

    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



  2. Default Re: problem with merging input type "file" and inout type "text"

    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" <kslite@smart.ca> 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:
    > <FORM METHOD="POST" ACTION="testuploadb2.asp"
    > ENCTYPE="multipart/form-data">
    > INPUT TYPE="text" NAME="name" >
    > ...
    > <INPUT TYPE="FILE" NAME="FILE1" >
    > <INPUT TYPE="SUBMIT" VALUE="Upload">
    > </FORM>
    >
    > 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
    >
    >




  3. Default Re: problem with merging input type "file" and inout type "text"

    Thanks a lot. It works now ...


    "Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> 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" <kslite@smart.ca> 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:
    > > <FORM METHOD="POST" ACTION="testuploadb2.asp"
    > > ENCTYPE="multipart/form-data">
    > > INPUT TYPE="text" NAME="name" >
    > > ...
    > > <INPUT TYPE="FILE" NAME="FILE1" >
    > > <INPUT TYPE="SUBMIT" VALUE="Upload">
    > > </FORM>
    > >
    > > 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
    > >
    > >

    >
    >




+ Reply to Thread

Similar Threads

  1. <input type="hidden" name="strInputElements" value="Name">
    By Application Development in forum DOTNET
    Replies: 1
    Last Post: 07-27-2007, 09:24 AM
  2. Use HTML <input type="file" > instead of .Net FileUpload control?
    By Application Development in forum DOTNET
    Replies: 3
    Last Post: 07-10-2007, 08:02 AM
  3. Input type File: "Browse" in other languages
    By Application Development in forum Javascript
    Replies: 9
    Last Post: 05-27-2007, 01:45 PM
  4. how to represent "inout" data type in testbenches in "verilog"
    By Application Development in forum verilog
    Replies: 2
    Last Post: 03-21-2007, 12:28 PM
  5. ServerXMLHTTP send text file to input TYPE="FILE" on https page
    By Application Development in forum XML SOAP
    Replies: 7
    Last Post: 06-28-2006, 12:12 PM