Wednesday, 28 August 2013

Persist Data Across Wizard Steps using PRG Patternin ASP.NET MVC

Persist Data Across Wizard Steps using PRG Patternin ASP.NET MVC

I am working on a wizard like interface in ASP.Net MVC using the
Post-Redirect-Get pattern. The wizard has only 2 steps. I understand how
to get data from the first step to the second via TempData, but I am
curious as to what is the best way to persist the data to the next (final)
step. Coming from a Classic ASP background I have used hidden fields
and/or session storage to solve this problem is the past, but I wonder if
there is a more elegant way to do this in ASP.NET MVC? For example is
there a way to pass the entire model contained in TempData to the next
step or do I need to split the data up into separate hidden fields/
session variables?

No comments:

Post a Comment