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 4571472
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T19:30:32+00:00 2026-05-21T19:30:32+00:00

I have a registration form in the side bar of my web application. When

  • 0

I have a registration form in the side bar of my web application. When the user submits the entered data, the user should be redirected to another page with a more complete registration form when he can fill the rest of the data. The data that was entered by the user in the first form should be already there in the second form, but that’s not happening… I checked to see the value of the view model I’m passing to the second action method and it was null and in the browser’s address bar I get:

http://localhost:2732/User/RegisterPage?model=Sharwe.MVC.ViewModels.RegisterPageViewModel

Here’s the code:

    public ActionResult Register()
    {
        return PartialView(new RegisterViewModel());
    }

    [HttpPost]
    public ActionResult Register(RegisterViewModel dto)
    {
        var model = Mapper.Map<RegisterViewModel, RegisterPageViewModel>(dto);
        return RedirectToAction("RegisterPage", "User", new { viewModel = model });
    }

    public ActionResult RegisterPage(RegisterPageViewModel viewModel)
    {
        return View(viewModel);
    }

Isn’t that the way to do this? Or am I missing something here…?

  • 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-21T19:30:33+00:00Added an answer on May 21, 2026 at 7:30 pm

    The Dictionary passed to RedirectToAction() is the Route Value not the View Model. And RedirectToAction() is basically telling the browser to go to a certain URL. Browser by default makes the GET request and obviously you lose your data.

    For this, you need to use TempData dictionary. You can store view model in TempData and then RedirectToAction() to RegisterPage. TempData saves the data for only 1 request span and would delete it automatically. It’s ideal for this scenario.

    See this for more details > The value for a object inside a viewmodel lost on redirect to action in asp.net mvc 2.0?

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

Sidebar

Related Questions

In my web application i have registration form, when user register i want to
I have a registration form where this CSS rules apply. when user submits with
I have a user registration form. I am doing server side validation on the
I have a registration form that when the user enters in valid registration data
I have simple registration form. Once all information entered, user click submit button and
I have a registration form. When I hit the Submit button it should check
on my web site I want to have login/registration form in modal window done
I have registration form, which is saving user info in 'tblusers' -> 'Username', but
I have a 3-part registration form using PHP: page 1 : collects info -
I am preparing a registration page using JSF/Spring webflow&mvc application. I have added two

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.