Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. uploading files, ASP?

uploading files, ASP?

Scheduled Pinned Locked Moved Web Development
helpquestionjavascriptdatabasesysadmin
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    allia
    wrote on last edited by
    #1

    consider a FORM with a Browse for file feature, and some other FORM elements in it. Now, lets assume that some FORM processing can't be done in Javascript and needs to post the information to the server for validation. Now, if the validation failed, I would like to present the user with an option to resubmit a correction. This is where I am stuck. The free ASPSimpleUpload component doesn't let me use FOR EACH element IN... which was intended to write out all the form data (regardless of what form elements I have) to a HIDDEN INPUT field. What I wanted to achieve by this is let the user correct only the non-valid fields, and the rest remain hidden. Then, upon re-submit, the form gets processed again. 1. What happens to the uploaded file? does it get uploaded again? 2. How can I go around the FOR EACH statment and let the user enter a correction? Is there a way to do a BACK button without loosing information? Notes: -I can't install DLLs or components on the server. -The server only supports ASPSimpleUpload -splitting the form from the file upload is hazardous, since someone can start the form, enter a record in the database, and not upload files... Appreciate the help or any input on this matter. I have read all the articles regarding this issue on codeproject. Thanks in advance! Does ASP stand for Awful Server Punishment ?

    A P 2 Replies Last reply
    0
    • A allia

      consider a FORM with a Browse for file feature, and some other FORM elements in it. Now, lets assume that some FORM processing can't be done in Javascript and needs to post the information to the server for validation. Now, if the validation failed, I would like to present the user with an option to resubmit a correction. This is where I am stuck. The free ASPSimpleUpload component doesn't let me use FOR EACH element IN... which was intended to write out all the form data (regardless of what form elements I have) to a HIDDEN INPUT field. What I wanted to achieve by this is let the user correct only the non-valid fields, and the rest remain hidden. Then, upon re-submit, the form gets processed again. 1. What happens to the uploaded file? does it get uploaded again? 2. How can I go around the FOR EACH statment and let the user enter a correction? Is there a way to do a BACK button without loosing information? Notes: -I can't install DLLs or components on the server. -The server only supports ASPSimpleUpload -splitting the form from the file upload is hazardous, since someone can start the form, enter a record in the database, and not upload files... Appreciate the help or any input on this matter. I have read all the articles regarding this issue on codeproject. Thanks in advance! Does ASP stand for Awful Server Punishment ?

      A Offline
      A Offline
      alex barylski
      wrote on last edited by
      #2

      Thats why real programmers use PHP :) jk. What happens to the uploaded file? does it get uploaded again? AFAIK yes it would, if it was successfully uploaded in the first place, unless ASPSimpleUpload checks for duplicates and auto-renames files to avoid conflict. How can I go around the FOR EACH statment and let the user enter a correction? Is there a way to do a BACK button without loosing information? Have you considered using cookies? My experience is very limited in ASP becuz I switched to PHP very early, so I'm not sure why you can't FOR EACH elements while using ASPSimpleupload. How are you suppose to validate INPUT fields period? Anyways, you could store the info in cookies and just use JScript to restore values in INPUT fields when someone clicks back. p.s-You might want to try and flag down Paul, he seems to be the resident ASP guru on CP :) Cheers and remember, you could easily solve this problem with PHP :) The word of the day is legs, let's go back to my house and spread the word ;P

      A 1 Reply Last reply
      0
      • A alex barylski

        Thats why real programmers use PHP :) jk. What happens to the uploaded file? does it get uploaded again? AFAIK yes it would, if it was successfully uploaded in the first place, unless ASPSimpleUpload checks for duplicates and auto-renames files to avoid conflict. How can I go around the FOR EACH statment and let the user enter a correction? Is there a way to do a BACK button without loosing information? Have you considered using cookies? My experience is very limited in ASP becuz I switched to PHP very early, so I'm not sure why you can't FOR EACH elements while using ASPSimpleupload. How are you suppose to validate INPUT fields period? Anyways, you could store the info in cookies and just use JScript to restore values in INPUT fields when someone clicks back. p.s-You might want to try and flag down Paul, he seems to be the resident ASP guru on CP :) Cheers and remember, you could easily solve this problem with PHP :) The word of the day is legs, let's go back to my house and spread the word ;P

        A Offline
        A Offline
        allia
        wrote on last edited by
        #3

        Hockey wrote: why you can't FOR EACH elements while using ASPSimpleupload Well you can't FOR EACH elements because the object doesn't support this property. You validate input by using the upload_component.Form methods. But I need to write about 30 lines of code to extract all data instead of using a simple FOR EACH loop... PHP is not an option since most of the code has been already written in ASP. converting the whole logic to PHP is a time hassle. Appreciate any ideas! Thanks.

        1 Reply Last reply
        0
        • A allia

          consider a FORM with a Browse for file feature, and some other FORM elements in it. Now, lets assume that some FORM processing can't be done in Javascript and needs to post the information to the server for validation. Now, if the validation failed, I would like to present the user with an option to resubmit a correction. This is where I am stuck. The free ASPSimpleUpload component doesn't let me use FOR EACH element IN... which was intended to write out all the form data (regardless of what form elements I have) to a HIDDEN INPUT field. What I wanted to achieve by this is let the user correct only the non-valid fields, and the rest remain hidden. Then, upon re-submit, the form gets processed again. 1. What happens to the uploaded file? does it get uploaded again? 2. How can I go around the FOR EACH statment and let the user enter a correction? Is there a way to do a BACK button without loosing information? Notes: -I can't install DLLs or components on the server. -The server only supports ASPSimpleUpload -splitting the form from the file upload is hazardous, since someone can start the form, enter a record in the database, and not upload files... Appreciate the help or any input on this matter. I have read all the articles regarding this issue on codeproject. Thanks in advance! Does ASP stand for Awful Server Punishment ?

          P Offline
          P Offline
          Populate123
          wrote on last edited by
          #4

          I have this code but the price in $ 25 only. Himadrish Laha

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups