title: Checking if Viewbag property is empty, and using default value in a view
body: <p>I have this piece of code in a MVC view that works, but it seams like a lot of code to achieve this simple thing. Any way to make it more efficient?</p>
  
  <pre><code>@if (string.IsNullOrEmpty(ViewBag.Name))
  {
   @:&amp;nbsp;    
  }
  else
  {
   @:ViewBag.Name
  }
  </code></pre>