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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T23:37:57+00:00 2026-05-11T23:37:57+00:00

How do you pass parameters in ASP.net MVC over two views, like a wizard?

  • 0

How do you pass parameters in ASP.net MVC over two views, like a wizard?

Or what is the best practice?

I am working on an inhouse bug tracking ASP.net application being moved to MVC, I can’t seem to shake the ASPX out of my head and am going in circles.

In the ASPX application.

Page1 -> Select Project, pass projectId in Querystring
Page2 -> Select IssueType, pass projectId and Issuetype in Querystring
Page3 -> Create New Issue, we can get the projectId and IssueType form querystring

How do we recreate the above flow in MVC?

  • 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-11T23:37:58+00:00Added an answer on May 11, 2026 at 11:37 pm

    A common practice for ‘wizard’ type systems is to use a single <form> element, with information from previous screens in hidden fields.

    Edit: per the request, here’s an example (I’m not familiar with ASP.net, so you’ll have to translate this into code yourself 🙁 ). Say you have a site that sells cars, and in your ordering form first you ask about the model car, and in subsequent screens you offer options that apply to that vehicle.

    <form action="order-wizard.html" method="POST">
        <!-- which step of the wizard are we on? -->
        <input type="hidden" name="step" value="1" />
        <!-- Get some info from the user for the first step of the wizard -->
        <select name="Model">
            <option value="Sedan">Sedan</option>
            <option value="Coup">Coup</option>
            <option value="Pickup">Pickup</option>
            <option value="Van">Van</option>
        </select>
        <input type="submit" />
    </form>
    

    When the user selects a model and submits the form, the controller for order-wizard.html can notice that the step option is 1, and knows to check that the user selected a model. Then it gan generate a page like this: (assuming the user selected “pickup”)

    <form action="order-wizard.html" method="POST">
        <!-- which step of the wizard are we on? -->
        <input type="hidden" name="step" value="2" />
        <!-- Stored results from the previous stage of the wizard -->
        <input type="hidden" name="Model" value="Pickup" />
        <!-- Additional information for the wizard.  More than one option can be
             requested for each stage of the wizard. -->
        <select name="Style">
            <option value="Short Bed">Short Bed</option>
            <option value="Long Bed">Long Bed</option>
            <option value="Extended Cabin">Extended Cabin</option>
            <option value="Dually">Dually</option>
        </select>
        <select name="Interior">
            <option value="Cloth">Cloth</option>
            <option value="Leather"> Leather </option>
        </select>
        <input type="submit" />
    </form>
    

    If the wizard needed to collect more information, There could be additional pages produced in this way with hidden inputs. Otherwise, If this was the last page and all information was gathered, the code for that page could then process the form as normal, as though all inputs had been given by the user on a single page request.

    The advantage of this technique is that the server does not need to cache any session information. Another advantage is that it provides a sort of RESTful interface, where a single page request from another tool can generate all of the inputs for the form, skipping over the intermediate wizard pages.

    A disadvantage is that since the page is generated dynamically based on user requests, the client will have to start over if they happen to navigate away from the page. Bookmarks just won’t work. It doesn’t save you anything in validation, either, since form inputs of this sort could be faked easily.

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

Sidebar

Ask A Question

Stats

  • Questions 135k
  • Answers 135k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer You don't have much to worry about due to the… May 12, 2026 at 7:03 am
  • Editorial Team
    Editorial Team added an answer This will never be true: if (getline (stream, logbuffer)) {… May 12, 2026 at 7:03 am
  • Editorial Team
    Editorial Team added an answer I guess I can see what is going wrong here.… May 12, 2026 at 7:03 am

Related Questions

I've asked a few questions on this topic before. Before we're able to implement
I have a whole bunch of web services each with several web methods. The
I have been looking at various dependency injection frameworks for .NET as I feel
This is a question with many answers - I am interested in knowing what

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.