c# - Pull information from partialview into final partialview before submit? -


i have form uses partialviews load different sections. when information filled out show on final partialview give confirmation page before submission. how grab information entered on 1 partialview , display submit on final?

my partialview code looks this:

@using (ajax.beginform("primaryapplicant", new ajaxoptions { httpmethod = "post", insertionmode = insertionmode.replace, updatetargetid = "step3", onsuccess = "showstep3" })) { <h4>primary applicant information</h4> @html.antiforgerytoken() @html.validationsummary(true) <hr/> <div class="form-group">     @html.labelfor(m => m.firstname, new { @class = "col-md-3 control-label" })     <div class="col-md-9">         <div class="col-md-4">             @html.textboxfor(m => m.firstname, new { @class = "form-control", placeholder = "first name" })         </div>         <div class="col-md-4">             @html.textboxfor(m => m.middlename, new { @class = "form-control", placeholder = "middle name" })         </div>         <div class="col-md-4">             @html.textboxfor(m => m.lastname, new { @class = "form-control", placeholder = "last name" })         </div>         @html.validationmessagefor(m => m.firstname)     </div> </div>     <div class="form-group">     @html.labelfor(m => m.ssn, new { @class = "col-md-3 control-label" })         <div class="col-md-9">             <div class="col-md-4">                 @html.textboxfor(m => m.ssn, new { @class = "form-control", placeholder = "social security number" })                 @html.validationmessagefor(m => m.ssn)                 </div>             </div> </div> <div class="form-group">     @html.labelfor(m => m.dob, new { @class = "col-md-3 control-label" })     <div class="col-md-9">         <div class="col-md-4">             @html.textboxfor(m => m.dob, new { @class = "form-control", type = "date", placeholder = "date of birth" })             @html.validationmessagefor(m => m.dob)             </div>         </div> </div> <div class="form-group">     @html.labelfor(m => m.email, new { @class = "col-md-3 control-label" })     <div class="col-md-9">         <div class="col-md-4">             @html.textboxfor(m => m.email, new { @class = "form-control", type = "email", placeholder="email address" })             </div>             @html.validationmessagefor(m => m.email)         </div> </div> 

i'm using models create input fields , of variables. after user fills out inputs on 1 partial view , hits continue opens next partialview. once form filled out how display final confirmation page echoing values input?

have view model per view.

  1. when next button clicked submit form current pages' action method.
  2. store form data/view model in user's current session retrieving later, display next view.
  3. repeat step 1 , 2 if necessary.
  4. retrieve data session , combine them final viewmodel display final confirmation page.

Comments

Popular posts from this blog

jQuery Mobile app not scrolling in Firefox -

c++ - How to add Crypto++ library to Qt project -

how to receive file in java(servlet/jsp) -