src/MVCContrib/Filters/TempDataToViewData.cs
/// <summary>
/// If a ViewResult is returned by a Controller Action, the contents of the TempData dictionary is copied to the ViewData dictionary.
/// </summary>
/// <param name="filterContext">The ActionExecutedContext</param>
If a ViewResult is returned by a Controller Action, the contents of the TempData dictionary is copied to the ViewData dictionary.
If a ViewResult is returned by a Controller Action the contents of the TempData dictionary is copied to the ViewData dictionary .
public override void OnActionExecuted(ActionExecutedContext filterContext) 
		{
			if(! (filterContext.Result is ViewResult)) return;
			var tempData = filterContext.Controller.TempData;
			var viewData = filterContext.Controller.ViewData;
			foreach(var pair in tempData)
			{
				if(!viewData.ContainsKey(pair.Key))
				{
					viewData[pair.Key] = pair.Value;
				}
			}
		}
public override void OnActionExecuted ( ActionExecutedContext filterContext ) { if ( ! ( filterContext . Result is ViewResult ) ) return ; var tempData = filterContext . Controller . TempData ; var viewData = filterContext . Controller . ViewData ; foreach ( var pair in tempData ) { if ( ! viewData . ContainsKey ( pair . Key ) ) { viewData [ pair . Key ] = pair . Value ; } } }
If a ViewResult is returned by a Controller Action, the contents of the TempData dictionary is copied to the ViewData dictionary.
If a ViewResult is returned by a Controller Action the contents of the TempData dictionary is copied to the ViewData dictionary .
filterContext
ActionExecutedContext
None