Creating a step-wise Wizard in ASP.net MVC 5 Razor Pages

Charles Zvarimwa 31 Reputation points
2021-06-06T10:19:17.107+00:00

I would like to create a wizard with 10 a minimum of steps that will allow user to fill in their data, save each step data so that they may continue later and finally submit the form after completing all the steps. Can anyone assist me on how I can achieve in this in razor pages

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,138 questions
0 comments No comments
{count} vote

Accepted answer
  1. Yogi 346 Reputation points
    2021-06-06T11:52:25.803+00:00

    I think you can easily get lot of tutorials on Razor Pages about this. I am sharing with you one such tutorial ASP.NET Core Razor Pages : CRUD Operations with Repository Pattern and Entity Framework Core


3 additional answers

Sort by: Most helpful
  1. Duane Arnold 3,211 Reputation points
    2021-06-07T01:02:41.35+00:00

    Yeah I have done step wizard in ASP.NET Web forms and ASP.NET MVC solutions. You can do the same I feel in an ASP.NET Razor Page solution as well.

    1) A SessionState database table will be needed that holds the XML serialized session object that holds the user data entered for all pages.

    2) The session object is serialized and saved to the SessionState table when the user leaves the page.

    3) The session object for the given user is retrieved from the SessionState table and put into session, and a given page is populated from the session object when going forward or backwardsin the step process.

    4) The user does the submit from the last page in the steps, then the data in the session object is sent to the database to be persisted to the application's database tables.

    5) The session object for the user is deleted out of the table.

    If the user walks away from the screen and a session timeout occurs, then the reactivation process of the page the user left executes the session recovery code and gets the user's session object from the SessionState table and populates the current page from the session object as if nothing happened and all is well.

    There is more to it but that's the jest of it.

    2 people found this answer helpful.

  2. devtekk 1 Reputation point
    2021-11-08T15:58:44.887+00:00

    I need to create request processes but they could have multiple people, sometimes in groups, that complete an action step. Also, the processes would not be linear as someone could return the request to an earlier step for a change.

    Example of actions:

    1) Manager submits request.
    2) Budget staff review request (entering data). This action is open to any of the users designated as Budget staff. A dashboard would show a list of open requests at that step and they click a link to open a request automatically assigning themselves.
    3) Budget Director (one pre-assigned person) approves. Budget Director could return the request to Budget Staff to change something.
    4) HR staff complete an action much like Budget Staff situation in step 2 above.
    5) Manager completes an action.
    6) Manager's director (assigned in Budget staff action) approves or sends to back to a previous step.

    Only the users involved in a request could see the info (HR and Budget would be able to at least view a request in the current action is not for them.

    Would the solutions mentioned in comments prior to my question be able to do this (with modifications)?

    Thanks.

    0 comments No comments

  3. Amer Jamaeen 1 Reputation point
    2022-01-23T14:25:51.917+00:00

    This is a step by step article on how to create a wizard using asp.net mvc core.
    smart-aspnet-mvc-wizard-part-1.html

    The wizard will not use any JavaScript or any client side framework only server side code.

    0 comments No comments