Created
June 29, 2015 12:40
-
-
Save szul/feef8d4cd52c133ba6a0 to your computer and use it in GitHub Desktop.
HttpContext to HttpContextBase and vice versa
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
//HttpContextBase to HttpContext (assumes HttpContextBase variable named contextBase) | |
HttpContext context = contextBase.ApplicationInstance.Context; | |
//HttpContext to HttpContextBase (assumes HttpContext variable named context) | |
HttpContextBase contextBase = new System.Web.HttpContextWrapper(context); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment