Form to request download, and redirect

C

Carole MacDonald

I've created a form to gather a user's contact information. Upon
clicking "submit", the app verifies the data. After verification, I
need 2 things to happen:
1) a thank you message to appear
2) a file to be downloaded to the user

I can do one of the two, but not both. I'm using either Redirect() to
the file (it is an exe, so it is causing the open/save dialog to come
up), or I can stream it directly to the Response stream. But doing
either of those cancels out any other actions to the page. So I can't
turn off the panel with the form and turn on the thank you panel. The
URL to the actual file must be hidden, so I can't just include a link
on the thank you page to actually do the download. I could make a
link with some authentication information, but I'd rather not have to
do the authentication twice.

I tried putting a form.submit() inside the thank-you message panel,
but that is being executed before the page is actually rendered. So
the download happens, but the contact form is still displayed, instead
of the thank you.

Any suggestions how to solve this problem?

Thanks,
Carole
 
B

Bruno Piovan

you could creat a thank you page and put an iframe with height and width = 0
with the source = the file's url.

Bruno
 

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

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,239
Members
46,827
Latest member
DMUK_Beginner

Latest Threads

Top