I have an ASP.NET WebForms application that has a feature that requires the user to provide data in multiple steps. This is currently implemented using multiple pages. So, the user visits step1.aspx, provides some information, and then is redirected to step2.aspx to provider additional information.
The objects that are manipulated as part of this process are stored in a generic List<> object. I'm currently storing this List<> in a Session variable so that the state of the objects is maintained between pages. Once the process is complete the data is sent to a web service api exposed by another application. I don't want to maintain the state of this data in a database between posts, preferring to keep it in memory until it gets submitted to the web service.
I'm in the process of extracting this logic out of the web application into it's own class library so we can use the same library from a windows application.
What are the best practices for maintaining this data between posts after extracting the business logic to a self-contained class library?