Created
July 27, 2010 18:10
-
-
Save stevehorn/492605 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//PassParametersDuringRedirectAttribute.cs | |
// ~Line 25 | |
public override void OnActionExecuting(ActionExecutingContext filterContext) | |
{ | |
base.OnActionExecuting(filterContext); | |
//Fair to say you'd only want this behavior on a GET request? | |
//I did this because it was hijacking properties on my model that was populated by a model binder. | |
if(filterContext.RequestContext.HttpContext.Request.HttpMethod == "GET") | |
{ | |
LoadParameterValuesFromTempData(filterContext); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment