Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6196869
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T03:43:04+00:00 2026-05-24T03:43:04+00:00

I’m trying to figure out how to pass a model across views Here is

  • 0

I’m trying to figure out how to pass a model across views

Here is what I’m doing, I have a Register, RegisterConfirm, RegisterComplete views.

User starts at Register, fills info, clicks continue and posts to RegisterConfirm where they click checkbox to agree to privacy policy then post to RegisterComplete which creates the user based on the model in the first Register view.

Code:


        [GET("Account/Register")]
        public ActionResult Register()
        {
            return View();
        }

        [POST("Account/Register/Confirm")]
        public ActionResult RegisterConfirm(RegisterModel model)
        {
            if (ModelState.IsValid)
            {
                return View(model);
            }
            else { return View("Register", model); }
        }

        [POST("Account/Register/Complete")]
        public ActionResult RegisterComplete(RegisterModel model, bool agree)
        {
            if (agree) { 
                // Create User
            }
            return View("Register", model);
        }


View Form


Register:
    @using (Html.BeginForm("RegisterConfirm", "Account", FormMethod.Post, new { @id = "create" }))
    {

Register Confirm:
    @using (Html.BeginForm("RegisterComplete", "Account", FormMethod.Post, new { @id = "create" }))
    {


Problem is, when I’m getting to RegisterComplete, model values are empty… any ideas or is this not possible? Or should this work and I need to double check my registercomplete?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T03:43:04+00:00Added an answer on May 24, 2026 at 3:43 am

    Is your RegisterConfirm view using display-only elements to show the registration information? If so, MVC won’t be able to bind the data to populate the model.

    You need to render the model as Input elements, even if they’re hidden, so that the model binder can populate RegisterModel (you can render the properties as both hidden elements for ‘data retention’ and output elements for display).

    If you are using Input elements, check that the names of those elements match the property names of RegisterModel, otherwise, again, the model binder won’t be able to populate RegisterModel.

    If you can’t, for whatever reason, put the data in Input elements in your RegisterConfirm view, you’ll need to store the data somewhere server-side, either in Session State (or TempData, which uses Session State anyway) or in a database of some description.

    The advantage with storing the model server-side is that you can be sure that the data hasn’t been tampered with between sending it to the client and receiving it back.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I am trying to loop through a bunch of documents I have to put
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
this is what i have right now Drawing an RSS feed into the php,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.