Hybrid File Upload/Form Data

J

James

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
 
T

Tim Slattery

James said:
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.
 
T

Tom Kaminski [MVP]

James said:
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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,020
Latest member
GenesisGai

Latest Threads

Top