title: .Net MVC : unable to get ViewBag value in View
body: <p>As a beginner i am doing very simple example to  understand  basic Razor concepts ,  When i set some values using ViewBag in my controller class and try to get them in view they are not printed , neither it shows insentience for this nor any error  , Please hep me with it .  this is what i  am doing </p>
  
  <p><strong>Mode Class : Product</strong></p>
  
  <pre><code>public class Product
      {
          public int ProductId      { get; set; }
          public string Name        { get; set; }
          public string Description { get; set; }
          public Decimal Price      { get; set; }
          public string Catagoery   { get; set; }
      }
  </code></pre>
  
  <p><strong>HomeController</strong>  (pasting only specific method that is not working for me )</p>
  
  <pre><code>   public ActionResult MyProduct()
  
          {
              ViewBag.ProductCount = 1; 
              ViewBag.ProductQuality = "Good"; 
               return View(product); 
  
          }
  </code></pre>
  
  <p><strong>ProductView</strong></p>
  
  <pre><code>@model RazorApplication.Models.Product
  
  @{
      ViewBag.Title = "Demo";
      Layout = "~/Views/_BasicLayout.cshtml";
  }
  
  &lt;table&gt;
          &lt;tr&gt;
              &lt;td&gt;Name&lt;/td&gt;&lt;td&gt;@Model.Name&lt;/td&gt;
  
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;Quality&lt;/td&gt;&lt;td&gt;@ViewBag.ProductCount&lt;/td&gt;
  
          &lt;/tr&gt;
  
          &lt;tr&gt;
              &lt;td&gt;Quality&lt;/td&gt;&lt;td&gt;@ViewBag.ProductQuality&lt;/td&gt;
  
          &lt;/tr&gt;
  
      &lt;/table&gt;
  </code></pre>