/// <summary> /// Performs a redirect to the previously specified page target, including the stored QueryString parameters. /// </summary> public void Go() { if (this._curMode == Mode.Redirect) { PageRedirect.RedirectToPage(this._dest, this._context, this._qsVals); } else if (this._curMode == Mode.ReturnToCallingPage) { if (string.IsNullOrEmpty(this._dest)) { if (this._includeQsNames.Count > 0) { PageRedirect.SendBackToCallingPage(this._context, this._qsVals, this._includeQsNames.ToArray()); } else { PageRedirect.SendBackToCallingPage(this._context, this._qsVals, this._includeQs); } } else { if (this._includeQsNames.Count > 0) { PageRedirect.SendBackToCallingPage(this._dest, this._context, this._qsVals, this._includeQsNames.ToArray()); } else { PageRedirect.SendBackToCallingPage(this._dest, this._context, this._qsVals, this._includeQs); } } } else { // Only way this can happen is if somebody messes with the code and // doesn't update this method. I like to be thorough... throw new InvalidOperationException("Redirect mode is not valid."); } }
//*************************************************************************** // Static Methods // public static void RedirectToPage(string destination, HttpContext context) { PageRedirect.RedirectToPage(destination, context, null); }