By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,868 Members | 1,974 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,868 IT Pros & Developers. It's quick & easy.

Image Uploading to a folder in classic ASP

P: 1
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.

Expand|Select|Wrap|Line Numbers
  1. <%@ Language="VBScript" %> <form method=post
  2.   enctype="multipart/form-data"
  3.   action=<%=request.servervariables("script_name")%>>
  4. 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
  5. If Request.TotalBytes > 0 Then
  6. Set objUpload = New vbsUpload
  7.  
  8. For lngLoop = 0 to objUpload.Files.Count - 1
  9. 'If accessing this page annonymously,
  10. 'the internet guest account must have
  11. 'write permission to the path below.
  12. objUpload.Files.Item(lngLoop).Save "c:\inetpub\wwwroot\puntoseguro\admin\image\"
  13.  
  14. Response.Write "File Uploaded"
  15.  
  16. Next
  17.  cia = Upload.Form("myname")
  18.  
  19. End if
  20. %>
  21.  
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("myname")
Jun 30 '15 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.