timer control in asp.net

Y

yoshitha

HI,

I have a doubt .

I am developing an application that is conducting test for the candidates.
now my doubt is test duration is 30 min.i am displaying the questions
randomly it is working well.
now i need to check the duration i have to use timer control on the page.
how to use and how to caliculate the remaing time period how much time
left,etc.or any alternative plz specify


plz give me help.

Regards,
Krishna.
 
J

JohnFol

Hi Krishna, the timer has the ability to raise events, such as 30 minutes
before the "Test Ended" code kicks in. What you probably want is a variable
that holds the exact time the Timer's .Start was called.

For example
Dim dtStartTime As Date

dtStartTime = Now.AddMinutes(30)

Me.TextBox1.Text = dtStartTime.Subtract(Now).ToString
 
J

JohnFol

Appologies, this is probably true in VB.Net, but not sure if applicable to
ASP.Net.
 
L

Lucas Tam

HI,

I have a doubt .

I am developing an application that is conducting test for the
candidates. now my doubt is test duration is 30 min.i am displaying
the questions randomly it is working well.
now i need to check the duration i have to use timer control on the
page. how to use and how to caliculate the remaing time period how
much time left,etc.or any alternative plz specify


You'll need a mix of technologies.

1. Client side Javascript to show the remaining time and to stop the
test if the time runs out.

2. Server side validation to ensure that the javascript was not bypassed
- so the initial start time must be logged somewhere - preferably in a
database or a session variable.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top