Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net (http://www.velocityreviews.com/forums/f29-asp-net.html)
-   -   Response.Redirect after a Response.Flush (http://www.velocityreviews.com/forums/t513208-response-redirect-after-a-response-flush.html)

danielhamd@yahoo.com 06-08-2007 08:47 PM

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


John Timney \(MVP\) 06-08-2007 08:52 PM

Re: Response.Redirect after a Response.Flush
 
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


"danielhamd@yahoo.com" <dahrnsbrak@gmail.com> wrote in message
news:1181335670.955808.156260@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
>




=?ISO-8859-1?Q?G=F6ran_Andersson?= 06-09-2007 09:57 AM

Re: Response.Redirect after a Response.Flush
 
danielhamd@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

=?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?= 06-10-2007 01:31 AM

RE: Response.Redirect after a Response.Flush
 
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




"danielhamd@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
>
>


danielhamd@yahoo.com 06-11-2007 02:05 PM

Re: Response.Redirect after a Response.Flush
 
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.com> wrote:
> 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




=?ISO-8859-1?Q?G=F6ran_Andersson?= 06-12-2007 05:10 PM

Re: Response.Redirect after a Response.Flush
 
danielhamd@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


All times are GMT. The time now is 01:37 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.