本文介绍了在回发期间将值存储在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中
发布评论