title: How to pass hidden values from view1 to view2 on button click
body: <p>I have two views. I view1 have text boxes to enter basic details. once the customer enters basic details and clicks add more details I need to pass the details entered in view1 should pass to the view2 textbox. I treid passing using hidden. But its not passing to next view. any suggestion please.</p>
  
  <p>View1 Controller:</p>
  
  <pre><code>    public ActionResult View1()
      {
          return View();
      }
  
   [HttpPsot]
   public ActionResult View2()
      {
          return ProcessAction();
      }
  </code></pre>
  
  <p>View2 Controller :</p>
  
  <pre><code>    public ActionResult View2()
      {
          return View();
      }
  </code></pre>
  
  <p>View1 :</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>    &lt;script&gt;
          $(document).ready(function() {
              $("#add").click(function() {View2", "Application")";
              });
          });
      &lt;/script&gt;</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>@using (Html.BeginForm("View1", "Application", FormMethod.Post)) 
  {
      @Html.AntiForgeryToken()
       @Html.HiddenFor(model =&gt; model.LastName)
       @Html.HiddenFor(model =&gt; model.FirstName)
       @Html.HiddenFor(model =&gt; model.Email)
      &lt;div class="col aligncenter"&gt;          
          &lt;div class="form-row topMargin"&gt;               
              &lt;div class="col-md-6 form-group"&gt;
                  @Html.TextBoxFor(model =&gt; model.Email)                    
              &lt;/div&gt;
              &lt;div class="col-md-4 form-group"&gt;
                  @Html.TextBoxFor(model =&gt; model.FirsttName)                    
              &lt;/div&gt;
              &lt;div class="col-md-2 form-group"&gt;
                  @Html.TextBoxFor(model =&gt; model.LastName)
               &lt;/div&gt;
          &lt;/div&gt;
          &lt;div class="form-row"&gt;
              &lt;div class="col-md-9 form-group text-right"&gt;
                  &lt;button class="btn" type="button" id="add" name="add" value="add"&gt;Add&lt;/button&gt;
              &lt;/div&gt;
              &lt;div class="col-md-3 form-group text-right"&gt;
                  &lt;button class="btn" type="submit" name=new" value="new"&gt;view old&lt;/button&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  }</code></pre>
  </div>
  </div>
  </p>
  
  <p>View2 :</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>@using (Html.BeginForm("View2", "Application", FormMethod.Post)) 
  {
      @Html.AntiForgeryToken()
      &lt;div class="col aligncenter"&gt;          
          &lt;div class="form-row topMargin"&gt;               
              &lt;div class="col-md-6 form-group"&gt;
                  @Html.TextBoxFor(model =&gt; model.Email)                    
              &lt;/div&gt;
              &lt;div class="col-md-4 form-group"&gt;
                  @Html.TextBoxFor(model =&gt; model.FirsttName)                    
              &lt;/div&gt;
              &lt;div class="col-md-2 form-group"&gt;
                  @Html.TextBoxFor(model =&gt; model.LastName)
               &lt;/div&gt;
  &lt;div class="col-md-2 form-group"&gt;
                  @Html.TextBoxFor(model =&gt; model.address)
               &lt;/div&gt;
  &lt;div class="col-md-2 form-group"&gt;
                  @Html.TextBoxFor(model =&gt; model.state)
               &lt;/div&gt;
  &lt;div class="col-md-2 form-group"&gt;
                  @Html.TextBoxFor(model =&gt; model.zip)
               &lt;/div&gt;
          &lt;/div&gt;
          &lt;div class="form-row"&gt;
              &lt;div class="col-md-9 form-group text-right"&gt;
                  &lt;button class="btn" type="submit" value="osubmit"&gt;submit&lt;/button&gt;
              &lt;/div&gt;
              
          &lt;/div&gt;
      &lt;/div&gt;
  }</code></pre>
  </div>
  </div>
  </p>