ASP.NET 动态页面生成

发布于 2024-09-08 17:23:10 字数 180 浏览 1 评论 0原文

我正在为我的大学项目开发​​在线调查应用程序。

我设法将新创建的调查数据保存到数据库中,现在的问题是我不知道如何将保存的问题动态填充到页面中(发送给客户以获取回复) 。并且该响应数据也应该保存到数据库中。

谁能帮我解决这个问题吗?我为此使用 ASP.NET。

谢谢

I'm developing an online survey application for my University project.

I managed to save the newly created survey data into the database and now the problem is that i don't know how to populate the saved questions into a page (which sent to the customer to get responses) dynamically. And that response data should also be saved to the database.

Can anyone please help me on this. I'm using ASP.NET for this.

Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

半寸时光 2024-09-15 17:23:10

首先,您需要一些数据库调用来获取问题。

  • select (id, description) from questions

然后您需要将此信息填充到数据控件中。我建议使用 DataList 或 Repeater。

假设答案是是/否,您还需要添加类似 RadioButtonList 之类的内容来收集 ItemTemplate 中是或否的选择。

您需要提交表单,因此应使用按钮。在单击事件中,循环遍历 DataList/Repeater 的每一行并收集答案。

First you need some database calls to get the questions.

  • select (id, description) from questions

Then you need to populate this information into a Data Control. I suggest a DataList or Repeater.

Assuming that the answers will be yes/no, you also need to add something like a RadioButtonList to collect the yes or no selection to the ItemTemplate.

You will need to submit the form, so a Button should be used. In the click event, loop through each row of the DataList/Repeater and gather the answers.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文