Re: Server.Transfer or Server.Execute vs WebClient
- From: "Terry Burns" <me@xxxxxxxx>
- Date: Sun, 12 Feb 2006 22:03:41 -0000
Did you try this with the additional attribute which preserves the context
and form variables on transfer ?
--
Terry Burns
http://TrainingOn.net
"ewolfman" <ewolfman@xxxxxxxxx> wrote in message
news:1139774236.499868.194130@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi Terry,
As I've written, Server.Transfer or Server.Execute - it doesn't matter.
Server.Transfer calls Server.Execute, but simply doesn't return the
control's execution.
So this isn't the answer.
However, I did manage to find the problem. The loading process of the
Page determines on how to load the page, using the IsPostback property.
The IsPostback property for a Server.Transfer returns false (in
contrast to the WebClient.UploadValues), because the context's handler
isn't the same as the target page, and the ServerExecuteDepth is
greater than 0 (in contrast to the WebClient effect).
Therefore - the following 2 lines (before calling the Server.Transfer)
- seem to have solved the problem:
type = Type.GetType("ASP.default_aspx");
HttpContext.Current.Handler =
(IHttpHandler)Activator.CreateInstance(type);
Thanks anyway.
.
- Follow-Ups:
- Re: Server.Transfer or Server.Execute vs WebClient
- From: ewolfman
- Re: Server.Transfer or Server.Execute vs WebClient
- References:
- Server.Transfer or Server.Execute vs WebClient
- From: ewolfman
- Re: Server.Transfer or Server.Execute vs WebClient
- From: Terry Burns
- Re: Server.Transfer or Server.Execute vs WebClient
- From: ewolfman
- Server.Transfer or Server.Execute vs WebClient
- Prev by Date: Re: Will a user ever download a .manifest file separately?
- Next by Date: Backup SQL Server to script file in code?
- Previous by thread: Re: Server.Transfer or Server.Execute vs WebClient
- Next by thread: Re: Server.Transfer or Server.Execute vs WebClient
- Index(es):