在线考试 [英] online_Exam

查看:65
本文介绍了在线考试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在asp.net中创建在线考试系统.我已经做了很多事情,但是我无法限制考试时间.我应该这样做-管理员可以设置考试时间,基于该持续时间,将进行考试.我已经通过javascript完成了此操作,但是当我单击下一步问题"按钮时,javascript时间又回到了初始阶段.因此,是否可以通过javascript或者我必须使用其他一些技巧.

我还想从您那里知道-"asp.net 2.0中未使用计时器控件".

i am creating online examination system in asp.net.I have done most of things, but i can''t able to limit the time for exam.I supposed to do like--administrator can set the duration of EXAM,based on that duration Exam will be taken.I have done this through javascript but when I click button as "Next Question" the javascript time is come back to initial stage.So,Is it possible through javascript Or I have to use some other technique.

I also want to know from you that-- "Timer control is not used in asp.net 2.0".

推荐答案

您不需要使用计时器控件,只需将开始时间存储在会话中即可. JavaScript可能会受到威胁(除非您完全控制环境),因为您可以附加调试器并更改值.

您可能最好使用JavaScript使会话保持活动状态,但要使用会话并在服务器上保持跟踪.

每次加载页面时,都可以使用ASP.NET将剩余时间注入到表单字段中.在您的JavaScript中使用该值作为倒数时钟,但不要将该时钟设为权威时钟.

希望这会有所帮助!

干杯.
You won''t need to use a timer control, just store the start time in the session. JavaScript can be compromised (unless you have full control over the environment) because you can attach a debugger and change values.

You are likely best to use JavaScript to keep the session alive, but use the session and keep track on the server.

On each page load, you can use ASP.NET to inject the time remaining into a form field. Use that value in your JavaScript for a countdown clock, but don''t make that clock the authoritative clock.

Hope this helps!

Cheers.


这篇关于在线考试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆