Click to See Complete Forum and Search --> : Response.Redirect cancels browser's frame


dtv
May 20th, 2004, 01:07 PM
With server-side code, I need to redirect to some aspx page and display it to the current frame which is loaded in visitor's browser by some other provider.

Server.Transfer doesnt seem to work different than .Redirect, although the books saying that .Transfer needs-not a post back to the client and then a trip to the server again, meaning that with .Redirect the server orders the client to change its original location and .Transfer does the relocation by fooling arround the client which its still expects the first address.

Craig Gemmill
May 20th, 2004, 01:40 PM
Hey dtv,

The only way I have ever solved this was to use an IFRAME. That doesn't mean another solution doesn't exist.

dtv
May 20th, 2004, 01:54 PM
Thanks for the reply Craig.

p/s - Sorry about my 2-month silence, I was out of business but now I have a brand new job.

coolbiz
May 20th, 2004, 10:10 PM
Response.Redirect does a round-trip to the client by sending client a REDIRECT header.

Server.Transfer does not do that. It basically, internally in IIS, load up the destination page and processes the output and then send it to client. As you can see the browser does not change the URL as it does not know that the server actually loaded a different page.

As for the FRAME, hmmm ... that is a little wierd. I should try it out and see the outcome.

-Cool Bizs