Hybrid File Upload/Form Data

Discussion in 'ASP General' started by James, Jun 17, 2005.

  1. James

    James Guest

    I have a form with a bunch of data that's input (dropdowns, textboxes, etc.)
    and I have a link to a popup window which uses the persits control to upload
    a file. They work well independently. The problem is, I now need to
    combine them into one page. Essentially, at the very bottom of the page I
    need to include a file browse control, then on the page that it posts to, I
    need to be able to insert the relevant data into a database, as well as save
    the file.

    There has to be a way to do this easily, but I'm just confused about the
    enctype="multipart/form-data" aspect and what I'll need to be wary of when
    merging these two forms.

    Thanks
     
    James, Jun 17, 2005
    #1
    1. Advertisements

  2. James

    Tim Slattery Guest

    "James" <> wrote:

    >I have a form with a bunch of data that's input (dropdowns, textboxes, etc.)
    >and I have a link to a popup window which uses the persits control to upload
    >a file. They work well independently. The problem is, I now need to
    >combine them into one page. Essentially, at the very bottom of the page I
    >need to include a file browse control, then on the page that it posts to, I
    >need to be able to insert the relevant data into a database, as well as save
    >the file.
    >
    >There has to be a way to do this easily, but I'm just confused about the
    >enctype="multipart/form-data" aspect and what I'll need to be wary of when
    >merging these two forms.


    It works fine. You receive a MIME-forrmatted blob that can be parsed
    to yield the name and value of every form element, including the name
    and contents of the uploaded file. There can even be several files.

    You'll probably need a component to parse this out and return items
    that your ASP code can use. Such things are available, do a Google
    search.

    --
    Tim Slattery
    MS MVP(DTS)
     
    Tim Slattery, Jun 17, 2005
    #2
    1. Advertisements

  3. "James" <> wrote in message
    news:...
    >I have a form with a bunch of data that's input (dropdowns, textboxes,
    >etc.)
    > and I have a link to a popup window which uses the persits control to
    > upload
    > a file. They work well independently. The problem is, I now need to
    > combine them into one page. Essentially, at the very bottom of the page I
    > need to include a file browse control, then on the page that it posts to,
    > I
    > need to be able to insert the relevant data into a database, as well as
    > save
    > the file.
    >
    > There has to be a way to do this easily, but I'm just confused about the
    > enctype="multipart/form-data" aspect and what I'll need to be wary of when
    > merging these two forms.


    Read the persists documentation - it should provide a detailed explanation
    on how to handle this.

    --
    Tom Kaminski IIS MVP
    http://www.microsoft.com/windowsserver2003/community/centers/iis/
    http://mvp.support.microsoft.com/
    http://www.iistoolshed.com/ - tools, scripts, and utilities for running IIS
     
    Tom Kaminski [MVP], Jun 17, 2005
    #3
  4. James

    Vic Sowers Guest

    "Tom Kaminski [MVP]" <tomk (A@T) mvps (D.O.T) org> wrote in message
    news:OkDi$...
    > "James" <> wrote in message
    > news:...
    >>I have a form with a bunch of data that's input (dropdowns, textboxes,
    >>etc.)
    >> and I have a link to a popup window which uses the persits control to
    >> upload
    >> a file. They work well independently. The problem is, I now need to
    >> combine them into one page. Essentially, at the very bottom of the page
    >> I
    >> need to include a file browse control, then on the page that it posts to,
    >> I
    >> need to be able to insert the relevant data into a database, as well as
    >> save
    >> the file.
    >>
    >> There has to be a way to do this easily, but I'm just confused about the
    >> enctype="multipart/form-data" aspect and what I'll need to be wary of
    >> when
    >> merging these two forms.

    >
    > Read the persists documentation - it should provide a detailed explanation
    > on how to handle this.


    Actually Persits - www.persits.com

    >
    > --
    > Tom Kaminski IIS MVP
    > http://www.microsoft.com/windowsserver2003/community/centers/iis/
    > http://mvp.support.microsoft.com/
    > http://www.iistoolshed.com/ - tools, scripts, and utilities for running
    > IIS
    >
     
    Vic Sowers, Jun 18, 2005
    #4
  5. James

    Bullschmidt Guest

    And here is a pure ASP (i.e. no components) resource for letting the
    user upload a file (and get the values of form fields):

    ASP File Upload Using VBScript by John R. Lewis - 7/10/2000
    http://aspzone.com/posts/160.aspx

    Best regards,
    J. Paul Schmidt, Freelance ASP Web Developer
    http://www.Bullschmidt.com
    ASP Design Tips, ASP Web Database Demo, Free ASP Bar Chart Tool...


    *** Sent via Developersdex http://www.developersdex.com ***
     
    Bullschmidt, Jun 30, 2005
    #5
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?U2FyYXY=?=

    Upload a file without file Upload control - ASP.Net

    =?Utf-8?B?U2FyYXY=?=, Aug 2, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    3,093
    Bruce Barker
    Aug 3, 2005
  2. Heather Fraser
    Replies:
    0
    Views:
    827
    Heather Fraser
    Jul 5, 2004
  3. Matt
    Replies:
    8
    Views:
    156,068
    zeeshanakhter2009
    May 26, 2012
  4. Replies:
    3
    Views:
    9,030
    Ross Bamford
    Nov 5, 2005
  5. Matt
    Replies:
    1
    Views:
    11,707
    David Dorward
    Oct 12, 2004
  6. Dan

    File upload & form data

    Dan, Oct 25, 2006, in forum: Java
    Replies:
    0
    Views:
    485
  7. Replies:
    1
    Views:
    1,163
    Gabriel Genellina
    Nov 25, 2006
  8. leoboiko
    Replies:
    0
    Views:
    523
    leoboiko
    Aug 6, 2008
Loading...