在回发期间将值存储在ArrayList中

编程入门 行业动态 更新时间:2024-10-27 15:25:39
本文介绍了在回发期间将值存储在ArrayList中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在开发在线考试项目.为此,我在页面上显示一个问题.用户回答问题后,单击下一步按钮,然后将显示下一个问题. 我的问题是如何将所有问题和用户选择的答案临时存储在ArrayList/Datatable中,并在完成测试后显示? 请建议我.

Hi, I am developing online examination project. For that i am displaying one question on the page. After answering the question user click next button then next question will display. My problems is how to store all the question and user selected answers temporarily in ArrayList/Datatable and show after completing test? Please suggest me.

推荐答案

在这里,我告诉您如何临时存储用户信息 使用会话变量临时存储数据 喜欢 Hi, Here I gave you idea how to store user information temply Use session variable to store data temporarly like DataTable dt=new DataTable(); dt.rows[0][0]="Questionid"; dt.rows[0][1]="userselected ans"; dt.rows[0][2]="correct ans"; //.. //.. Session["udata"]=dt; //display second question

完成所有问题后,您可以显示以前的信息

After completing all questions you can display previous information

DataTable dt=(DataTable)Session["udata"]; Lblfrstans.Text=dt.rows[0][1].toString(); Lblscndans.Text=dt.rows[1][1].tostring(); //.. //..

希望您了解会话创建及其使用方法 最好的

I hope you know about session creation and how to use it All the Best

更多推荐

在回发期间将值存储在ArrayList中

本文发布于:2023-11-25 01:11:23,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1627705.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:ArrayList

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!