Home » ASP.NET » Multi-Step Processing in ASP.NET

Multi-Step Processing in ASP.NET


I received the following question a few days ago but I’ve been so busy with billable work that I just haven’t had a chance to answer it until now.  Actually, I’m still busy, but I hate letting these questions go for too long.

“Right now I am working on a project where I have to screen a user.  This is a multi-step process.  At the end of the process I store the data back to the system. Currently, I am storing all the options a user will select in a session variable and then finally using them at the last step. Can you please suggest a better way to store this temporary data that does not require using a session? This type of situation comes up a lot.  We’ve used multiview to get it working. But this does not seem to be viable in all situations.”

If I had a multi-step process that I needed to complete, I’d probably use the ASP.NET Wizard Control, which is a lot like the MultiView control you mention.  The main difference is that it handles the navigation between the views for you.

If your process requires you to navigate between separate ASPX pages, then you’ll probably want to do something with cross-page posting.

Frankly, I don’t find session variables to be all that evil.  Your trade-offs are to either store all of the data on the page using hidden form variables or ASP.NET view state (using MultiView or Wizard controls), which makes the page heavier than it might otherwise be, or you need to store the information in session variables, which takes up memory on the server.

For most web sites the extra memory used on the server is not an issue because the site just doesn’t get that much traffic.

Unless we are talking about a 50-step process, storing the information in the page isn’t much of an issue either.

Since you never state what it is about the MultiView control that makes it not viable in all situations, I’m left puzzled.  Seems like its cousin, the Wizard control, is exactly what you need.  I’m guessing there is something you don’t understand about how these controls should be used.


Other post in ASP.NET

Related Post

  • HttpContext.Items[] vs Session[]HttpContext.Items[] vs Session[] Since .NET first became available, passing data around during a request has become a lot easier.  The ability to set a property has made that so.  Still, there are times when […]
  • ASP.NET GridView Edit All Rows At OnceASP.NET GridView Edit All Rows At Once I just saw a question about this yesterday and realized that while I know how to do this, not everyone does.  So, here we go... Here's the problem.  You want to be able to edit […]
  • ListView and the DataPagerListView and the DataPager One of the new controls that Visual Studio 2008 brings us is the ListView.  Now, the ListView control is really several different controls all rolled into one.  There is a lot to see with […]
  • Embedding Google Search Appliance Results in ASP.NETEmbedding Google Search Appliance Results in ASP.NET Several of the projects I’m involved with use the Google Search Appliance for their search engine.  For each of these projects, we’ve wanted to integrate the results on an ASPX […]
  • Converting a DataList to a ListViewConverting a DataList to a ListView Yesterday, I spent the bulk of the day converting a DataList to a ListView.  I thought I'd spend a little time relating the process for those of you who might be interested in doing […]

About Dave Bush

Dave Bush is a Full Stack ASP.NET developer focusing on ASP.NET, C#, Node.js, JavaScript, HTML, CSS, BootStrap, and Angular.JS.Does your team need additional help in any of the above? Contact Dave today.