src/MVCContrib/Filters/PassParametersDuringRedirectAttribute.cs
/// <summary>
/// Stores any parameters passed to the generic RedirectToAction method in TempData.
/// </summary>
Stores any parameters passed to the generic RedirectToAction method in TempData.
Stores any parameters passed to the generic RedirectToAction method in TempData .
public override void OnActionExecuted(ActionExecutedContext filterContext)
		{
			var result = filterContext.Result as IControllerExpressionContainer;
			var redirectResult = filterContext.Result as RedirectToRouteResult;
			if(result != null && result.Expression != null && redirectResult != null)
			{
				var storedParameters = AddParameterValuesFromExpressionToTempData(filterContext.Controller.TempData,
				                                                                  result.Expression);
				RemoveStoredParametersFromRouteValues(redirectResult.RouteValues, storedParameters.Keys);
			}
		}
public override void OnActionExecuted ( ActionExecutedContext filterContext ) { var result = filterContext . Result as IControllerExpressionContainer ; var redirectResult = filterContext . Result as RedirectToRouteResult ; if ( result != null && result . Expression != null && redirectResult != null ) { var storedParameters = AddParameterValuesFromExpressionToTempData ( filterContext . Controller . TempData , result . Expression ) ; RemoveStoredParametersFromRouteValues ( redirectResult . RouteValues , storedParameters . Keys ) ; } }
Stores any parameters passed to the generic RedirectToAction method in TempData.
Stores any parameters passed to the generic RedirectToAction method in TempData .
filterContext
ActionExecutedContext