Created
July 24, 2013 18:35
-
-
Save bmancini55/6073203 to your computer and use it in GitHub Desktop.
ASP.NET MVC CookieTempDataProvider
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
public class MyBaseController: Controller | |
{ | |
/// <summary> | |
/// Overrides the creation of the TempDataProvider | |
/// to use a Cookie based TempDataProvider instead of Session | |
/// </summary> | |
protected override ITempDataProvider CreateTempDataProvider() | |
{ | |
return new CookieTempDataProvider(HttpContext); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How to use CookieTempDataProvider to store and retrieve data from action method?