Rolling my own ASP.NET registration wizard

I guess this is a pretty tricky question to answer without sitting down and looking at all the source code, but I figured I would post it anyway and see if you had any conceptual thoughts about the process we are using in mine. company.

The project I'm currently working on is a self registration page for our end users. In the past, we used 3 separate ASP.NET controls for each of our different registration processes. Our clients have consistently stated that the process was very confusing and they never knew which of the three different processes they should be doing. So after being asked to compile three apps in one, I quickly found that the account controls were not very extensible. The new process had to be very dynamic, so the static, one way, masters did not meet the needs.

So in an attempt to make the process more dynamic, I rolled out my own registration application that relies on session state to get the user through the registration. The way I am currently configured is using binary flag values ​​for possible registration steps. Then I have an integer value in the SessionState that I update after the user completes the step.

Example:


const int accountNumberStep = 1;
const int userPassStep = 2;
const int usernameReclaimStep = 4;


/* code snipped */


// Code at the end of step Username/Password selection
// at the end of Username/Password selection step, update session state to record that step was finished
SessionState("stepsCompleted") = (int)SessionState("stepsCompleted") | userPassStep;


/* code snipped */


// Code at the beginning of each step to verify previous step was completed
if (!((int)SessionState("stepsCompleted") & userPassStep == userPassStep))
{
    RedirectToPreviousPage(previousStep:=userPassStep);
}

      

Another important part of this (the dynamic thing at play here) is using a session variable to keep track of the type of logging they go through. In other words, they can have three different types of registrations that they can go through:

  • Normal registration
  • Account renewal registration
  • Get user account with disabled account

The type of registration that the user completes is determined as the registration progresses. For example, after a user enters an account number, I determine that they are not a new user, so they will either be updating or re-enabling. This path is stored in a variable of the registration type in the session state.

The last main part of the app keeps track of textbox values, radiobox selection, etc. All of this is also stored in the SessionState, so if at any point in the process the user wants to back up one or two steps, they will not lose the previous values ​​they entered. These values ​​are also used in the last step of the registration process, in which the customer is actually registered in the back-panel database.

As you can see, this is all different from what the ASP.NET wizard does. Except for the registration type variable. This allows me to deploy registration to different paths at any point in the process.

Anyway, sorry if this is confusing. I mostly hope someone comes along that has done something like this and can give me some advice.

Thanks in advance for your help.

CJAM

0


source to share


1 answer


The wizard control is based on the MultiView control, which basically provides a means of displaying one (and only one) view at a time. The only difference is that you need to manually control the navigation with MultiView, which allows you to perform non-linear step-by-step progress.

In a MultiView, the values ​​of all controls in all views will be stored in the ViewState, so there is no need to store them in the session. The buttons in each view can send messages back, and based on the values ​​of other controls, you can display a specific view.



Look at ASP.NET Quickstart for the MultiView and View controls

+2


source







All Articles