asp.net mvc - reusing pages/controllers in workflow
Posted
by fregas
on Stack Overflow
See other posts from Stack Overflow
or by fregas
Published on 2010-05-03T19:46:57Z
Indexed on
2010/05/03
19:58 UTC
Read the original article
Hit count: 384
ASP.NET
|asp.net-mvc
I have 2 workflows:
1) the user signs up for the first time. They see 3 different screens, their basic user information, their credit card, and some additional profile information. They complete these 3 steps in a wizard like fashion, where each time they hit "submit" they leave the current screen and move on to the next.
2) the user already is signed up. He has links in the navigation to these 3 seperate pages. He can update them in any order. When he hits save, he doesn't leave the page he's on, it just shows something at the top that says "Credit Card Info saved..." or whatever. Possibly using ajax or maybe a full page refresh.
I would like to reuse the code not only the view but also in the controller for these 3 screens between the two workflows, but without a ton of if...then logic to determine where to go next depending on whether its a first signup in the wizard or updating individual parts of a profile.
Any ideas?
© Stack Overflow or respective owner