473,402 Members | 2,061 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,402 software developers and data experts.

response.redirect and refreshing a page?

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 'a file is ready for download

response.redirect (Session("FileName"))

** check if download successful, then set
** the tray info accordingly and...

response.redirect thispage.asp
end if

Of course the second response.redirect never gets called, is there any
other way I can do this?
Jul 19 '05 #1
4 2778
ASP can't see what's going on with the client's hard drive...

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/


"Trigger" <tr************@hotmail.com> wrote in message
news:25*************************@posting.google.co m...
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 'a file is ready for download

response.redirect (Session("FileName"))

** check if download successful, then set
** the tray info accordingly and...

response.redirect thispage.asp
end if

Of course the second response.redirect never gets called, is there any
other way I can do this?

Jul 19 '05 #2
Ok, but asp can see whats going on at the server right? If I were to
use a Stream, say:

<%
Response.BinaryWrite objStream.Read

If (objStream.EOS = false) Then

download_completed = "False"

Else if (objStream.EOS = true) Then

download_completed = "True"

End If

objStream.Close
Set objStream = Nothing
%>

Is this a possible method for checking if a download was completed?
Is there a better way?

ASP can't see what's going on with the client's hard drive...

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/


"Trigger" <tr************@hotmail.com> wrote in message
news:25*************************@posting.google.co m...
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 'a file is ready for download

response.redirect (Session("FileName"))

** check if download successful, then set
** the tray info accordingly and...

response.redirect thispage.asp
end if

Of course the second response.redirect never gets called, is there any
other way I can do this?

Jul 19 '05 #3
> Is this a possible method for checking if a download was completed?

No, the fact that a download has completed, or its current progress, is
still indicated by the CLIENT's system, not the server's.
Is there a better way?


"Click here when download is complete."

If you think people are going to lie about it, maybe you're targeting the
wrong users. :-)

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
Jul 19 '05 #4
Thanx, I kinda suspected as much...looks like "click here..." is what
its gonna have to be. :)
Is this a possible method for checking if a download was completed?


No, the fact that a download has completed, or its current progress, is
still indicated by the CLIENT's system, not the server's.
Is there a better way?


"Click here when download is complete."

If you think people are going to lie about it, maybe you're targeting the
wrong users. :-)

Jul 19 '05 #5

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

Similar topics

3
by: Paul | last post by:
I'm not getting the results I want when I use Response.Redirct in a ASP page. I enter this line of code in a asp page from domain1.com. Response.Redirect...
3
by: Justin | last post by:
Hi, Im confused here over the usage of Response.Redirect and Server.Transfer. I used frameset for my work, what are the proper usages of the two methods that seems working similar.. The...
6
by: Sam | last post by:
I have some issues with HTTP Headers and I was hoping for some pointers or references to good articles. Here is the problem. I have 6 .aspx pages, each page contains a common .ascx. This ascx...
3
by: Sehboo | last post by:
On my ASP page, when I click a button, I want to do three things: 1. Check for some values. 2. Open a new window and pass some values as query string. 3. Redirect to some other page Here...
13
by: Tim | last post by:
Hello, Is there a way to "cancel" a response.Redirect? For example, in the code below, could I insert anything in the Catch statement that would cancel the redirect and resume flow after the...
2
by: SJ | last post by:
I have a request to the server that could take upto 10 mins to come back and display the results. I want to either a) Redirect to a new "Please wait" page till the processing is done, then...
5
by: venner | last post by:
I'm having an issue with an ASP.NET website after upgrading to ASP.NET 2.0. The website makes use of a central authentication service (CAS) provided at the university I work for. Each page checks...
12
by: gigi | last post by:
How to send more than one value using response redirect? For example i can send one like this response.Redirect "pregled.asp?ime=" & strUserName but how to send two or more values? I tried...
2
by: archana | last post by:
Hi all, I am new to asp.net. I am trying to use server.transfer and respnse.redirect. When i nagivate to page using server.transfer on navigated page if i click on refresh i am getting...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
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,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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...

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.