Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/database/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Database 我在visual studio 2012中使用ASP.NET进行了一项调查。但是如何创建报告呢?_Database_Visual Studio 2012_Webforms_Survey - Fatal编程技术网

Database 我在visual studio 2012中使用ASP.NET进行了一项调查。但是如何创建报告呢?

Database 我在visual studio 2012中使用ASP.NET进行了一项调查。但是如何创建报告呢?,database,visual-studio-2012,webforms,survey,Database,Visual Studio 2012,Webforms,Survey,我使用WEB表单创建了调查 现在,我不知道怎么做报告。。。也许用数据库?但是我如何为用户对调查的回答创建数据库呢 我的调查包括无线电按钮列表,回答是和否 这是我的网络表单调查的一些部分 <tr> <td class="auto-style2">5) Would you share our website to your friends?</td> <td> <asp:RadioButtonList ID="rb

我使用WEB表单创建了调查

现在,我不知道怎么做报告。。。也许用数据库?但是我如何为用户对调查的回答创建数据库呢

我的调查包括无线电按钮列表,回答是和否

这是我的网络表单调查的一些部分

<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>

5) 你会把我们的网站分享给你的朋友吗?
对
不
6) 有什么意见或建议吗?




既然您想存储用户的答案并用它们生成报告,我建议先为用户创建一个表

  • 创建一个用户表-该表包含用户ID、密码和其他用户详细信息,如名称等
  • 创建一个包含所有问题和选项的问题
  • 创建一个答案表-该表存储用户ID的答案
  • 因此,使用用户表进行登录。 用户登录后,显示问题表中的问题和选项。 当用户单击末尾的提交按钮时,将用户的所有答案与他的用户ID一起存储在答案表中

    创建报告时,您可以轻松地从应答表中检索所需用户(具有特定用户ID)或所有用户的数据

    同样,使用检索到的数据生成报告有很多选项。根据您的要求,您可以仅显示它或将其导出到excel工作表等。希望这有帮助