uploading files, ASP?
-
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 ?
-
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 ?
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 -
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 ;PHockey 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. -
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 ?
I have this code but the price in $ 25 only. Himadrish Laha