Question

I used WEB FORM to create the survey.

Now, I don't know how to make the reports... maybe using database? But how do I create the database for the users' answers to the survey?

My survey includes radiobuttonlists with Yes and No answers...

This is some parts of my WEB FORM survey...

<tr>
    <td class="auto-style2">5) Would you share our website to your friends?</td>
    <td>
        <asp:RadioButtonList ID="rbl5" runat="server" AutoPostBack="True" RepeatDirection="Horizontal" RepeatLayout="Flow">
            <asp:ListItem>Yes</asp:ListItem>
            <asp:ListItem>No</asp:ListItem>
        </asp:RadioButtonList>
    </td>
</tr>
<tr>
    <td class="auto-style2">6) Any comments or suggestions?</td>
    <td>
        <asp:TextBox ID="tbComment" runat="server" Height="182px" TextMode="MultiLine" Width="271px"></asp:TextBox>
            <br />
            <br />
            <br />
            <input type="button" onclick="btnSubmit_Click()" value="Submit" />&nbsp;&nbsp;&nbsp;&nbsp;
            <asp:Button ID="btnReset" runat="server" OnClick="btnReset_Click" Text="Reset" />
    </td>
</tr>
Was it helpful?

Solution

since you want to store the user's answers and make a report out of them, I suggest creating a table for the users first.

  1. Create a User table - that has UserId , Password and other user details like name,etc
  2. Create a Question table - that has all the questions and options.
  3. Create an Answer table - that stores the users answer with the UserId.

So, use the User table for Login purpose. Once the user logged in , show the Questions and options from the Question table. When the user clicks the submit button at the end, store all the user's answers in the Answer table along with his UserId.

While creating a report, you can easily retrieve the data from the Answer table for the required user (with particular UserId) or for all the users.

And again there are so many options for making reports with the retrieved data. You can just display it or export it to an excel sheet, etc., based on your requirement. Hope this helps.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top