473,395 Members | 1,502 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,395 software developers and data experts.

Response.Redirect after a Response.Flush

I have a link on an ASP page that loads the Response stream with
a .vcs file stream and then sends it to the clients machine. This
opens the calendar entry in their Outlook, etc. However, once this is
done, I'd like to have the page redirect to a new page that says "You
have successfully blah blah blah." This doesn't seem to be possible,
since the response stream has already been sent with the .vcs file.
Does anyone have any ideas for a clever way around this? I'd like to
let the user know that everything went smoothly.

Thanks,
Daniel

Jun 8 '07 #1
5 7809
You could use frame set, one frame to deliver the vcs and set a completed
session variable and one frame to check if the delivery had completed by
checking the session variable, polling it from the iframe. If your send was
concluded then you could probably just refresh the frameset with javascript
an load your message. There might be another eay, but sometime the old
traditional ways are easiest.

Regards

John Timney (MVP)
http://www.johntimney.com
http://www.johntimney.com/blog
"da********@yahoo.com" <da********@gmail.comwrote in message
news:11**********************@q69g2000hsb.googlegr oups.com...
>I have a link on an ASP page that loads the Response stream with
a .vcs file stream and then sends it to the clients machine. This
opens the calendar entry in their Outlook, etc. However, once this is
done, I'd like to have the page redirect to a new page that says "You
have successfully blah blah blah." This doesn't seem to be possible,
since the response stream has already been sent with the .vcs file.
Does anyone have any ideas for a clever way around this? I'd like to
let the user know that everything went smoothly.

Thanks,
Daniel

Jun 8 '07 #2
da********@yahoo.com wrote:
I have a link on an ASP page that loads the Response stream with
a .vcs file stream and then sends it to the clients machine. This
opens the calendar entry in their Outlook, etc. However, once this is
done, I'd like to have the page redirect to a new page that says "You
have successfully blah blah blah." This doesn't seem to be possible,
since the response stream has already been sent with the .vcs file.
Does anyone have any ideas for a clever way around this? I'd like to
let the user know that everything went smoothly.

Thanks,
Daniel
Why do you want to redirect to a new page, why not just display it on
the current page?

You can't use Response.Redirect after anything has been sent to the
browser, as a redirect replaces the response with a redirection page. If
you want to go from an existing page to another page you have to use
Javascript.

--
Göran Andersson
_____
http://www.guffa.com
Jun 9 '07 #3
That's correct. How about

Server.Transfer("newpage.aspx?msg=you have successfully...")

-- Peter
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net


"da********@yahoo.com" wrote:
I have a link on an ASP page that loads the Response stream with
a .vcs file stream and then sends it to the clients machine. This
opens the calendar entry in their Outlook, etc. However, once this is
done, I'd like to have the page redirect to a new page that says "You
have successfully blah blah blah." This doesn't seem to be possible,
since the response stream has already been sent with the .vcs file.
Does anyone have any ideas for a clever way around this? I'd like to
let the user know that everything went smoothly.

Thanks,
Daniel

Jun 10 '07 #4
Server.Transfer also does not work. I would ideally like to modify
the current page, but that doesn't work either. Any changes I make to
the page are ignored when I send the file stream to the user's
browser.

On Jun 9, 5:57 am, Göran Andersson <g...@guffa.comwrote:
danielh...@yahoo.com wrote:
I have a link on an ASP page that loads the Response stream with
a .vcs file stream and then sends it to the clients machine. This
opens the calendar entry in their Outlook, etc. However, once this is
done, I'd like to have the page redirect to a new page that says "You
have successfully blah blah blah." This doesn't seem to be possible,
since the response stream has already been sent with the .vcs file.
Does anyone have any ideas for a clever way around this? I'd like to
let the user know that everything went smoothly.
Thanks,
Daniel

Why do you want to redirect to a new page, why not just display it on
the current page?

You can't use Response.Redirect after anything has been sent to the
browser, as a redirect replaces the response with a redirection page. If
you want to go from an existing page to another page you have to use
Javascript.

--
Göran Andersson
_____http://www.guffa.com

Jun 11 '07 #5
da********@yahoo.com wrote:
Server.Transfer also does not work. I would ideally like to modify
the current page, but that doesn't work either. Any changes I make to
the page are ignored when I send the file stream to the user's
browser.
I see. Anything that you send to the browser after the .vcs file will be
treated as garbage data at the end of that file. You can't both send a
file and an html page in the same response.

If you want to send a file and also display something in the page, you
have to open a separate window for the file.

Example:

<a href="GetMessage.aspx"
onclick="window.open('GetVcsFile.aspx','_blank');" >

--
Göran Andersson
_____
http://www.guffa.com
Jun 12 '07 #6

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

Similar topics

0
by: Copa | last post by:
Hello, I am testing buffering an asp page and Flushing information out to the browser, hence i wrote the code in an asp page that follows this Message Post. The loops are suppose to simulate...
7
by: Jon Spivey | last post by:
Experimenting with response.flush() but can't seem to get it to work. This code <% response.write "<p>started</p>" response.flush() for i = 1 to 10000000 i = i +1 next response.write...
3
by: Gary | last post by:
I am having a strange problem that I cannot solve. I have an asp page that I use for a user to login and gain access to other pages. When the user logs in I set a couple of session variables like...
11
by: Stephen | last post by:
I was wondering if someone can help me with an web application design problem. I have a aspx page which builds up an arraylist called addresses and outputs the values in the arraylist items to a...
2
by: tesn | last post by:
i have an aspx page, i do a response.write ( some html) then response.flush( an error occurs (and on my webconfig i have <customErrors mode="On" defaultRedirect="./Error.aspx" > Then i do a...
1
by: Martin Lee | last post by:
I know that this is something of an old chestnut. Nevertheless, my problem is as follows; I have a page in which I write html out to the client using Response.Write(), followed by...
2
by: Glen Wilkin via DotNetMonster.com | last post by:
Is there a way I can call Response.Redirect after I've done a Response.Flush? I send some html to load an animated gif that plays whilst my page loads, it has some extensive database calls to...
12
by: Jim Rodgers | last post by:
I have a big asp file that has an error under certain conditions -- totally repeatable. However, it only fails when I set response.buffer = True at the top. WHen I set it False in order to debug...
3
by: Jim Rojas | last post by:
I am running IIS v6.1 on a virtual hosting server. Changing the default metabase value is out of the question. Can someone tell me how I can fix this script? Thank you. <% set conn =...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...

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.