title: Get value of an item from ViewData Asp.Net
body: <p>How to get the item associated to a key from ViewData in view ? </p>
  
  <p>I mean something like that <code>ViewData["key"].Item</code>
  Is it possible ? </p>
  
  <p>I'm setting it from an ActionResult in Controller like this</p>
  
  <pre><code>ViewData["LeftUploadedData"] = Pic1;
  </code></pre>
  
  <p>and in my view </p>
  
  <pre><code>var uploadedImg = ViewData["LeftUploadedData"] as Picture; 
  if (uploadedImg.ByteImage != null) 
  {
      &lt;img src="data:image;base64,@Convert.ToBase64String(uploadedImg.ByteImage)" style="width: 100%; max-height: 100%" /&gt;
  }
  </code></pre>