Storage environment for the life cycle of a single request?

I am sure that on all storage media objectsimilar to HttpContext.Current.Session, there was a public request that was stored globally only for the life of one request, but I cannot let his life not remember him.

+5
source share
3 answers

I bet you think of HttpContext.Items .

Gets a collection of keys / values ​​that can be used to organize and exchange data between the IHttpModule interface and the IHttpHandler interface during an HTTP request.

Very useful for sharing states between HttpModules, HttpHandlers and pages from different parts of the request loop.

:

, HttpContext.Items ASP.NET WebForms, ASP.NET MVC, -. .

+10

TempData ASP.Net MVC. . , .

0

Could you use ViewData(if its ASP.NET MVC) or ViewState (if its ASP.NET)?

0
source

All Articles