.net.net-4.0asp.net-mvc-3

Hold values in request scope in MVC 3 without IOC?


How can i hold values in http request scope without using IOC ?

Quick answer will be appreciated.


Solution

  • Put them into System.Web.HttpContext.Current.Items

    Via MSDN:

    Gets a key/value collection that can be used to organize and share data between an IHttpModule interface and an IHttpHandler interface during an HTTP request.