Server.Transfer Vs. Response.Redirect
Response.Redirect simply sends a message (HTTP 302) down to the browser. Server.Transfer happens without the browser knowing anything, the browser request a page, but the server returns the content of another.
Response.Redirect simply sends a message (HTTP 302) down to the browser. Server.Transfer happens without the browser knowing anything, the browser request a page, but the server returns the content of another.
Response.Redirect simply sends a message (HTTP 302) down to the browser. Server.Transfer happens without the browser knowing anything, the browser request a page, but the server returns the content of another.
How about a TransferResult class? (based on Stans answer) /// <summary> /// Transfers execution to the supplied url. /// </summary> public class TransferResult : ActionResult { public string Url { get; private set; } public TransferResult(string url) { this.Url = url; } public override void ExecuteResult(ControllerContext context) { if (context == null) throw new ArgumentNullException(“context”); … Read more