An Example of a two page upload with Form Variables

Last post 09-10-2012, 8:33 AM by Kenneth. 1 replies.
Sort Posts: Previous Next
  •  09-09-2012, 11:58 AM 74602

    An Example of a two page upload with Form Variables

    An Example of a two page upload with Form Variables 


    I have a need for a two page upload method.  Here is what I have existing on my web site and I need to replace the uploader and I would prefer to
    use AspUploader but from all the forums answers and the sample code I have not seen anything that works or I can get to work.


    I have an entry.asp page called cm_entry.asp on this page I have a form that collects data from a user:


    Name
    Catgetory
    Project Name
    Comments


    1 upload file


    it is build using


    <FORM name="cm"  METHOD="post" action="cm_add.asp">
      <input type=text name="user_name">
      <input type=text name="category">
      <select name="prj_name">
        <option> Project #1
      </select>
      <textarea NAME="cm_comments" wrap=virtual rows=6 cols=45> </textarea> 
      
      <input type=file name="file1">
    </form>




    The cm_add.asp page is simple


     user_name = Request.Form("user_name")
     category = Request.Form("category")
     prj_name = Request.Form("prj_name")
     cm_comments = Request.Form("cm_comments)
     
     With this I add a record to the database, change the file name that was uploaded to a new one and then I save the file.
     
     
     
     
    The AspUploader works great at getting the file and storing it on the web server but I can not find any way to get the form data fields that I need.


    Do you have an example of a two page process that has a real form variables like <input type=text> on it and can display the text field
     after the file has been posted or even before?


    I tried all these examples:


    form-keepingstate.asp
    form-manualstart.asp
    misc-filemanager.asp


    I searched the forum and tried some of those solutions.  


    I have been trying to find a working solution and really love AspUploader.


    Do you have a function that can retrieve the form variables after your code calls the Request.BinaryRead()?


  •  09-10-2012, 8:33 AM 74608 in reply to 74602

    Re: An Example of a two page upload with Form Variables

    Hi AndrewBarnes,

     

    Please refer to example page  ajax-multiplefiles.asp and ajax-attachments.asp.

     

    ajax-multiplefiles.asp will post the data to  ajax-multiplefiles-handler.asp

     

    ajax-attachments.asp will post the data to ajax-attachments-handler.asp

     

    Regards,

     

    Ken 

     

View as RSS news feed in XML