By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,214 Members | 2,038 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,214 IT Pros & Developers. It's quick & easy.

Response.Redirect after a Response.Flush

P: n/a
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
Share this Question
Share on Google+
5 Replies


P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.