Create wizard type navigation in MVC
Posted on 2010-09-01
I’m writing a customer survey app in MVC.
I have a view that is populated by looping through a customer survey and outputs the questions and question choices. For example
Q1 What would you rate as acceptable?
a. 10 hours
b. 20 hours
c. 30 hours
Q2 What is the time scale for this issue?
a. 1 hour
b. 2 hours
c. 3 hours
And so on. In the view all the questions are displayed in one view but I want to break up each question so it is displayed one at a time.
I want to convert the view so it is a in wizard format with a next button so that each question is displayed at one time and when you hit the “next” button the second question is displayed and so on.
For info this is a snippet of how I loop through the customer survey to populate the view
foreach (var qChoice in question.questionChoices)