title: Keeping ViewBag value after postback
body: <p>I have a problem with a ViewBag function pointer value being lost during a PostBack.</p>
  
  <p>My site has a banner ( partial view ) where I indicate my customer's status by utilizing a ViewBag function pointer:</p>
  
  <pre><code>ViewBag.CustomerStatus= new Func&lt;id, string&gt;(GetCustomerStatus);
  </code></pre>
  
  <p>(Where id is my customer's id and returned string it's returned status )</p>
  
  <p>As I start going to other pages that utilize the banner partial view I loose my CustomerStatus ViewBag variable. I know ViewBags are only available "per page" but how can I make my Customer status function available from other places in the application without being redundant and repeating ViewBag.CustomerStatus= new Func(GetCustomerStatus); on every single ActionMethod call ?</p>
  
  <p>Is it possible to have a function pointer stored in Session/ViewState? Safe ?
  How can I access my up to date customer status across postbacks ?</p>
  
  <p>Thank you in advance.</p>