I'm trying to build a tray for users to download their selected items.
I was wondering if anyone knows how to response.redire ct 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("FileNa me") <> "" Then 'a file is ready for download
response.redire ct (Session("FileN ame"))
** check if download successful, then set
** the tray info accordingly and...
response.redire ct thispage.asp
end if
Of course the second response.redire ct never gets called, is there any
other way I can do this? 4 2803
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.goog le.com... I'm trying to build a tray for users to download their selected items. I was wondering if anyone knows how to response.redire ct 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("FileNa me") <> "" Then 'a file is ready for download
response.redire ct (Session("FileN ame"))
** check if download successful, then set ** the tray info accordingly and...
response.redire ct thispage.asp end if
Of course the second response.redire ct never gets called, is there any other way I can do this?
Ok, but asp can see whats going on at the server right? If I were to
use a Stream, say:
<%
Response.Binary Write objStream.Read
If (objStream.EOS = false) Then
download_comple ted = "False"
Else if (objStream.EOS = true) Then
download_comple ted = "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.goog le.com... I'm trying to build a tray for users to download their selected items. I was wondering if anyone knows how to response.redire ct 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("FileNa me") <> "" Then 'a file is ready for download
response.redire ct (Session("FileN ame"))
** check if download successful, then set ** the tray info accordingly and...
response.redire ct thispage.asp end if
Of course the second response.redire ct never gets called, is there any other way I can do this?
> 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/
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. :-) This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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 "http://www.domain2.com/VDIR2/table.asp"
& "?PubID=" & PubID & "&PubName=" & PubName
The query string is data to open a DB. the page displays
|
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 problem i faced while using Response.Redirect is that
the page that is directed to, does not looks as
desired..the textboxes are not visible anymore and so as
|
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 serves two purposes, 1. it contains a tab strip
with response.redirects to navigate to the other pages;
2. I authenticate the user by check to see if a cookie
exists, if it doesn't I redirect to a login screen.
|
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 is the code:
If (sServiceCenter = "*ALL") Then
sServiceCenter = "%"
|
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 try-catch?
Try
Response.Redirect(strPage)
Catch ex1 As Threading.ThreadAbortException
ex1 = ex1
'Cancel Respone here
| |
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
redirect back to the results page , or
b) Display a "Please wait" message on the same page that sends the request
to the server and refresh the page to display the results.
I know websites like orbitz and travelocity do this.
Any idea how I would...
|
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 a session
variable, and if it is not present, does a Response.Redirect to a
webpage for the CAS passing a url parameter for the url to post back
to. The CAS provides a page for the user to log into, validates the
username and password, and then...
|
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
response.Redirect("pregled.asp?ime=" & strUserName & " & prezime = " &
strUserLastName)
but it didn't work.
|
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 error. But this is not happening when i
use response.redirect.
On msdn i read thaat i may get unexpected result in server.transfer.
|
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.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
| |
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 launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |