473,544 Members | 2,308 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to redirect after the download starts

Hi,

I am having a requirement where in user can click on a link and the download
popup appears and then user should be redirected to a congratulations page.

We didn't bother whether the download is successful or not but as soon as
user clicks on the download link the popup appears, and then the user should
be directed to the congratulations page.

I have written the standard code to download the file but after that i am
unable to redirect the user to another page.

Can anybody help me out to achive the same.

--
Thanks
Hitesh
Nov 19 '05 #1
4 2683
You probably will have to use window.open( '' ) to start the download, then
in your parent window, redirect to the congratulations page.

bill
"Hitesh" <Hi****@discuss ions.microsoft. com> wrote in message
news:8C******** *************** ***********@mic rosoft.com...
Hi,

I am having a requirement where in user can click on a link and the download popup appears and then user should be redirected to a congratulations page.
We didn't bother whether the download is successful or not but as soon as
user clicks on the download link the popup appears, and then the user should be directed to the congratulations page.

I have written the standard code to download the file but after that i am
unable to redirect the user to another page.

Can anybody help me out to achive the same.

--
Thanks
Hitesh

Nov 19 '05 #2
Hi William,

Thanks for your sugggestion and its working too but i have one question
related to this suggestion and i guess you probably expecting it!

The thing is what about the window that gets opened up, do we have any way
to hide that window? Because for users its difficult to accept that a window
appears just becuase they are downloading something.
--
Thanks
Hitesh
"William F. Robertson, Jr." wrote:
You probably will have to use window.open( '' ) to start the download, then
in your parent window, redirect to the congratulations page.

bill
"Hitesh" <Hi****@discuss ions.microsoft. com> wrote in message
news:8C******** *************** ***********@mic rosoft.com...
Hi,

I am having a requirement where in user can click on a link and the

download
popup appears and then user should be redirected to a congratulations

page.

We didn't bother whether the download is successful or not but as soon as
user clicks on the download link the popup appears, and then the user

should
be directed to the congratulations page.

I have written the standard code to download the file but after that i am
unable to redirect the user to another page.

Can anybody help me out to achive the same.

--
Thanks
Hitesh


Nov 19 '05 #3
When you open a new window to another address, it will open the new window.
When the only thing sent by the server to the "new" browser window, is a
downloaded file, on my Windows 2000 Client, it basically closes out the
window and switches to a dowload dialog.

You will probably want to test this, but I believe it should work.

bill

"Hitesh" <Hi****@discuss ions.microsoft. com> wrote in message
news:7D******** *************** ***********@mic rosoft.com...
Hi William,

Thanks for your sugggestion and its working too but i have one question
related to this suggestion and i guess you probably expecting it!

The thing is what about the window that gets opened up, do we have any way
to hide that window? Because for users its difficult to accept that a window appears just becuase they are downloading something.
--
Thanks
Hitesh
"William F. Robertson, Jr." wrote:
You probably will have to use window.open( '' ) to start the download, then in your parent window, redirect to the congratulations page.

bill
"Hitesh" <Hi****@discuss ions.microsoft. com> wrote in message
news:8C******** *************** ***********@mic rosoft.com...
Hi,

I am having a requirement where in user can click on a link and the

download
popup appears and then user should be redirected to a congratulations

page.

We didn't bother whether the download is successful or not but as soon as user clicks on the download link the popup appears, and then the user

should
be directed to the congratulations page.

I have written the standard code to download the file but after that i am unable to redirect the user to another page.

Can anybody help me out to achive the same.

--
Thanks
Hitesh


Nov 19 '05 #4
Hi William,

Did you mean to say that the window never appears up on your client. On my
side it apears and be there untill the user made their choice (open, save,
cancel) about the download. Once they made the choice the window gets closed
automatically.

What i am looking for is there any way so that the window never appears. Is
this possible from your last answere it seems that you are not getting the
window at all and there is not other thing on that page except the download
code.

Please share your thoughts on this. And till now what ever you are
suggesting is taking me into the right direction so thanks for it!
--
Thanks
Hitesh
"William F. Robertson, Jr." wrote:
When you open a new window to another address, it will open the new window.
When the only thing sent by the server to the "new" browser window, is a
downloaded file, on my Windows 2000 Client, it basically closes out the
window and switches to a dowload dialog.

You will probably want to test this, but I believe it should work.

bill

"Hitesh" <Hi****@discuss ions.microsoft. com> wrote in message
news:7D******** *************** ***********@mic rosoft.com...
Hi William,

Thanks for your sugggestion and its working too but i have one question
related to this suggestion and i guess you probably expecting it!

The thing is what about the window that gets opened up, do we have any way
to hide that window? Because for users its difficult to accept that a

window
appears just becuase they are downloading something.
--
Thanks
Hitesh
"William F. Robertson, Jr." wrote:
You probably will have to use window.open( '' ) to start the download, then in your parent window, redirect to the congratulations page.

bill
"Hitesh" <Hi****@discuss ions.microsoft. com> wrote in message
news:8C******** *************** ***********@mic rosoft.com...
> Hi,
>
> I am having a requirement where in user can click on a link and the
download
> popup appears and then user should be redirected to a congratulations
page.
>
> We didn't bother whether the download is successful or not but as soon as > user clicks on the download link the popup appears, and then the user
should
> be directed to the congratulations page.
>
> I have written the standard code to download the file but after that i am > unable to redirect the user to another page.
>
> Can anybody help me out to achive the same.
>
> --
> Thanks
> Hitesh


Nov 19 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
2795
by: Trigger | last post by:
I'm trying to build a tray for users to download their selected items. I was wondering if anyone knows how to response.redirect a file (for the user to download) and check to see if the download was successful/unsuccessful, then have the asp page reload itself based on the result? e.g. something like this: if Session("FileName") <> "" Then...
3
12390
by: James Kirk | last post by:
The script below allows me to link to a file and as the user clicks to download, the 'File Download' windows appears as normal, and the user can download... The original page is then redirected to a new page.. This works, but it also opens a blank page.. How can this be chaged to stop the blank page from opening... ? <script ...
9
15066
by: Glen | last post by:
I'm writing a console utility to download specific files from web sites based on the command line options. In most cases, I can trap the 404 error when the file isn't available because the operator mistyped the URL or it's offline for whatever reason. The problem I'm running into is with certain sites where the admin has set up a redirect to...
2
4164
by: mboyda | last post by:
I have a block of code that useses outputstream to save a pdf to a client computer. It prompts the user with the save dialog, works great but the response finishes after the download completes. How do I redirect the users to a new friendly page after the download completes. The aspx page comes back with a ugly "action canceled". I prefer...
8
2156
by: Mantorok | last post by:
Hi all When I start a new thread that tries to call: HttpContext.Current.Response.Redirect() It fails as Current returns null, is there anyway to access the current httpcontext from within a new thread? Thanks
12
18863
by: JenHu | last post by:
Hi all, I have to ask a stupid question: In asp.net, I use Response.Redirect ("Main.aspx") to redirect pages, but what is the syntax of redirect forms in vb.net windows application? I have a login page, after clicked "login", it will direct the page to main.vb, but error says "response is not declared".......
4
2038
by: =?Utf-8?B?SlA=?= | last post by:
All the sudden my app has started to loose Session values after a Response.Redirect to another page in the same project. Ive read several post about setting the Terminate Boolean to false to solve this problem, but it hasnt work. On top of that it seems total random. I have a start.aspx page that all other web application call to begin the...
4
8625
by: ridgedale | last post by:
I wonder if anyone can help me out with this. I am sending the user to a download page where when they click on the download button the file is downloaded and then I want the user redirected after the file download to a confirmation page. My download processing page is as follows: <?php $mytalk = $_GET; if($_GET == "1"): $mytalk =...
9
21265
by: Matt Nunnally | last post by:
I have a form which allows the user to download a simple text file. They click on the download button and it brings up the "Save As" dialog. Once they save the file, I want them to be redirected to another page. Here is the code I'm using: Response.ContentType = "text/plain" ...
0
7447
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7378
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7638
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7792
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
5947
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5314
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3437
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
1857
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1000
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.