Image Uploading to a folder in classic ASP

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dharmeshjohn
    New Member
    • Jun 2015
    • 1

    Image Uploading to a folder in classic ASP

    I am trying to upload a image into a folder using classic asp. I am able to upload image into a folder but not getting the values of other input fields.

    Code:
    <%@ Language="VBScript" %> <form method=post
      enctype="multipart/form-data"
      action=<%=request.servervariables("script_name")%>>
    Your File:<BR><input type="file" name="YourFile"><BR> <input type="text" name="myname" id="name12"> <BR> <input type="submit" name="submit" value="Upload"> </form> <% Dim objUpload, lngLoop, cia
    If Request.TotalBytes > 0 Then
    Set objUpload = New vbsUpload
    
    For lngLoop = 0 to objUpload.Files.Count - 1
    'If accessing this page annonymously,
    'the internet guest account must have
    'write permission to the path below.
    objUpload.Files.Item(lngLoop).Save "c:\inetpub\wwwroot\puntoseguro\admin\image\"
    
    Response.Write "File Uploaded"
    
    Next
     cia = Upload.Form("myname")
    
    End if
    %>
    When I submit the form, I am getting the following error, File Uploaded Microsoft VBScript runtime error '800a01a8'

    Object required: ''

    /admin/test.asp, line 26

    line 26 - cia = Upload.Form("my name")
    Last edited by Rabbit; Jun 30 '15, 03:44 PM. Reason: Please use [code] and [/code] tags when posting code or formatted data.
Working...