title: Storing data in Thread Local Storage / HttpContext Current Items
body: <p>Storing data in Thread-Local Storage or <code>HttpContext.Current.Items</code>, which one is more efficient….?<br/>
  This is for storing master data/parameters in a web application. <br/>
  Code for placing data in both method are: <br/><br/>
  <b>1. System.Web.HttpContext.Current.Items</b></p>
  
  <pre><code>public static void Add(string pName, object pValue)
  {
      System.Web.HttpContext.Current.Items.Add(pName, pValue);
  }
  </code></pre>
  
  <p><b>2. TLS</b></p>
  
  <pre><code>public static void Add(string pName, object pValue)
  {
      Thread.SetData(Thread.GetNamedDataSlot(pName), pValue);
  }
  </code></pre>
  
  <p><br/> Thanks....</p>