Hi,
I have been asked to create a rather long form/survey and was wondering how to approach this...
Basicially, the first thing we do is capture some information about the user (name, dates, etc). Then we need to determine which parts of the form/survey are going to apply to this particular user (subjects include "Fire Safety", "Hot Works", "Electrical Work", "Working with Chemicals", etc).
Once the user has filled in this information (check boxes - "Yes" / "No") we then know which sections of the form to present to the user. For example, if the user has indicated that Fire Safety and Electrical Work apply, then we only need to present questions belonging to these 2 categories.
What I am struggling with is determining what is the best way to do this in terms of whether to use a Wizard, MultiView or maybe something else.
What are you thoughts on it - what would be your preferred approach & why?
Thanks
Gary
Loading
Gary KingPosted Jan 5, 2011, 6:09 AM
Thanks for your suggetsion, but I dont think that you understand what I am looking for (also, the sample code you posted does not appear to contain an asp.net Wizard control).
What I am looking to do is have a Wizard that contains an initial "page" (Step) that the user selects which Question Sets. WHen the user selects the Sets that they want to answer, then the code should create one Step for each selected Set and then finally create a Final "page" (Step) that will commit the answers from each of the steps to a database.
So, below is a simple example of how the wizard will start out.
The first step has 3 options (Check Boxes) that the user must select at least one of or any combination of the 3.
Let's assume the user has selected QSet1 and QSet3, the code should now insert 2 additional wizard steps - 1 which contains the Questions relating to QSet1 and 1 that contains the Questions relating to QSet3.
The user clicks Next to go to the first set of questions (QSet1), answers all the questions in that set, then clicks Next
Now the user is presented with the second set of questions (QSet3), answers all the questions in that set and clicks Next
Finally the user is presented with the final page where the user can click on Finish and all the answers from the the selected sets will be saved to the database. <asp:Wizard ID="Wizard1" runat="server" ActiveStepIndex="0" Height="266px" Width="567px">
<WizardSteps>
<asp:WizardStep runat="server" Title="Initial">
<asp:CheckBox ID="QSet1" runat="server" Text="Question Set 1" TextAlign="Left" />
<br />
<asp:CheckBox ID="QSet2" runat="server" Text="Question Set 2" TextAlign="Left" />
<br />
<asp:CheckBox ID="QSet3" runat="server" Text="Question Set 3" TextAlign="Left" />
asp:WizardStep>
<asp:WizardStep runat="server" Title="Final">
asp:WizardStep>WizardSteps>
asp:Wizard>
This is a very simple example of what I want to achieve - in reality, the requirement is much more complex (eg, the sets and questions will be stored in the database, so first I will need to pull all of the Question Sets from the database and then pull all the Questions relating to the selected sets from the database and create the various controls (Textboxes, Labels, DropDownLists, etc) on the relavent Qizard Step).
All that I am looking for at the moment is how to utilize the Wizard control (or indeed whether an alternative approach is better).
To help you better understand what I am trying to achieve, let's imagine that this is a maths quiz. The first page will ask the user which type of maths questions they want to answer (Addition, Subtraction, Multiplication and Division). If the user choses Addition and Subtraction, then the first Wizard step to be added would contain a number of Addition questions (1+1=?, 2+2=?, 3+4=?). The second Wizrad step would contain a number of Subtraction questions (7-4=?, 4-2=?, 5-1=?). On the final step the user can then save their answers to the database.
Prasant JinagaPosted Jan 5, 2011, 4:34 AM
I would suggest you to use Wizard because once the user selects any subject or multiple subjects, if u use wizard it will take through different steps automatically...I have attached one project just check out that...u can refer
Thanks,
Prasant