title: ASP.NET MVC ViewBag return null
body: <p>Why <code>@Html.LabelFor(model =&gt; model.data, ((string)ViewBag.id))</code> 
  return in <code>public ActionResult Index(Data item)</code> null instead of <code>100</code>. How to fix this?</p>
  
  <pre><code>    public ActionResult Index()
      {
          ViewBag.id = "100";
          return View();
      }
  
      [HttpPost]
      public ActionResult Index(Data item)
      {
          return View();
      }
  </code></pre>
  
  <p>Index.cshtml</p>
  
  <pre><code>@model TestForm.Models.Data
  @{
      ViewBag.Title = "Index";
  }
  
  &lt;h2&gt;Index&lt;/h2&gt;
  
  @using(@Html.BeginForm())
  {
      @Html.LabelFor(model =&gt; model.data, ((string)ViewBag.id))
      &lt;input type="submit"/&gt;
  }
  </code></pre>