title: How to Use ViewData and ViewBag with Umbraco Surface Controllers
body: <p>I have just spent 2 hours trying to work out why when I put a string in to View.Bag/ViewData inside my Surface controller, when I try and get the string back in the view I get null.</p>
  
  <p>In the end I have solved the problem by putting the string in to a session variable insted. </p>
  
  <p>Would like to know though why it wasn't working, and how to fix it.</p>
  
  <p>Thanks in advance.</p>