title: MVC4 - Passing model between views
body: <p>I have a model what i want fill in steps like this: 
  actionresult1(model)->actionresult2(model)-actionresult3(model)</p>
  
  <p>My model for exaple is Person:</p>
  
  <pre><code>public class Person{
    string FirstName {get;set;}
    string Lastname {get;set;}
    int Age {get;set;}
  }
  </code></pre>
  
  <p>In my PersonController i have three ActionResults:</p>
  
  <pre><code>public ActionResult FillFirstName(Person model)//First page where i start. Model is empty
      {
              return View("~/Views/FillFirstName.cshtml", model);           
      } 
  public ActionResult FillLastName(Person model)//Second page, where first name is filled
      {
              return View("~/Views/FillLastName.cshtml", model);           
      } 
  public ActionResult FillAge(Person model)//When i click submit button in FillLastName.cshtml view then it submits form here and model have filled only LastName and FirstName is empty.
      {
              return View("~/Views/FillAge.cshtml", model);           
      } 
  </code></pre>
  
  <p>And my three views are:</p>
  
  <p>1)FillFirstName.cshtml</p>
  
  <pre><code>@using (@Html.BeginForm("FillLastName", "Person"))
  {
     @Html.TextBoxFor(m =&gt; m.FirstName)
     &lt;input type="submit" name="Next" value="Next" /&gt;
  }
  </code></pre>
  
  <p>2)FillLastName.cshtml</p>
  
  <pre><code>@using (@Html.BeginForm("FillAge", "Person"))
  {
     @Html.TextBoxFor(m =&gt; m.LastName)
     &lt;input type="submit" name="Next" value="Next" /&gt;
  }
  </code></pre>
  
  <p>3)FillAge.cshtml</p>
  
  <pre><code>@using (@Html.BeginForm("NextAction", "Person"))
  {
     @Html.TextBoxFor(m =&gt; m.Age)
     &lt;input type="submit" name="Next" value="Next" /&gt;
  }
  </code></pre>
  
  <p>Problem: When i try to pass model between views it contains olny this data what i have submited on last view.</p>
  
  <p>Reason: I have form what is 2000 lines, and i want to cut it into smaller pieces.</p>
  
  <p>Is there someway i can use Viewbag or ModelState or something to keep the model filled with all data what i have submitted on previous pages? Can someone give me some example please? :)</p>