title: MVC3 Razor ViewData
body: <p>I have an online form. for example it asks for first name and last name. When they submit I send them to another view. this second view has a few more textboxes (password, email address, username) it also has first name and last name though. If they fill out the first form and fill in firstname/lastname i want the second form to display these values since they have already been filled in.</p>
  
  <p>in the first form I am putting all the filled out information into TempData["entry"]</p>
  
  <p>in the second form i am doing this check.</p>
  
  <pre><code>        if (TempData["entry"] != null)
          {
              var _model = (AccountInformationModel)TempData["entry"];
  
              ViewData["_firstName"] = _model.NameFirst;
              ViewData["_lastName"] = _model.NameLast;
          }
  
          return View("Register");
  </code></pre>
  
  <p>i guess in my view im a bit confused on how to display this data in a textbox. I have this in my view but it doesnt seem to be working.</p>
  
  <pre><code>       &lt;div class="editor-label"&gt;
              @Html.LabelFor(m =&gt; m.FirstName)
          &lt;/div&gt;
          &lt;div class="editor-field"&gt;
              @Html.TextBox("FirstName", ViewData["FirstName"])
              @Html.ValidationMessageFor(m =&gt; m.FirstName)
          &lt;/div&gt;
  </code></pre>
  
  <p>clearly the line that says...</p>
  
  <pre><code>   @Html.TextBox("FirstName", ViewData["FirstName"])
  </code></pre>
  
  <p>doesnt work..</p>