473,385 Members | 1,353 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

timer control in asp.net


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.

Nov 19 '05 #1
4 1643
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

"yoshitha" <jy********@nannacomputers.com> wrote in message
news:eS**************@tk2msftngp13.phx.gbl...

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.

Nov 19 '05 #2
Appologies, this is probably true in VB.Net, but not sure if applicable to
ASP.Net.
"JohnFol" <Ou************@WibbleObbble.Com> wrote in message
news:hk******************@newsfe6-win.ntli.net...
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

"yoshitha" <jy********@nannacomputers.com> wrote in message
news:eS**************@tk2msftngp13.phx.gbl...

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.


Nov 19 '05 #3
You'll need to use some client side script for the timer.
Here's an example that uses the javascript setTimeout function.
http://www.crowes.f9.co.uk/Javascript/timer.htm

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net
"yoshitha" <jy********@nannacomputers.com> wrote in message
news:eS**************@tk2msftngp13.phx.gbl...

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.

Nov 19 '05 #4
"yoshitha" <jy********@nannacomputers.com> wrote in
news:eS**************@tk2msftngp13.phx.gbl:

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.
--
Lucas Tam (RE********@rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
http://members.ebay.com/aboutme/coolspot18/
Nov 19 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: William Bub | last post by:
Is there an accurate way to create a "stopwatch" good to 1/10 of a second? I'm not sure if I should use the timer control, or some way to access the computer timer. I found the following site...
3
by: David | last post by:
Hi There! I'm using Timer control to record how long my application perform certain tasks. However, apparently Timer control is not doing its' job (i.e. Not firing Tick event) while my...
11
by: Steve Jorgensen | last post by:
I've recently been playing with some UI ideas that require the user of a timer to drive animation. The problem I'm having is that Access routinely stops firing timer events for long periods of...
5
by: Dhilip Kumar | last post by:
Hi all, I have developed a windows service using the windows service project template in VS.NET. I have used three controls in the service, a timer, performance counter and a message queue...
7
by: Noozer | last post by:
I have a timer on a form. It isn't firing at all. I know that the timer is enabled, and that the interval is low (4000, which should be 4 seconds). To ensure the timer wasn't being inadvertantly...
2
by: vinay | last post by:
Hi I must be missing some obvious point, but can someone let me know how do I add a windows.forms.timer control to a form at run time Private TM as new windows.forms.time Dim sForm as for ...
7
by: RobKinney1 | last post by:
Hello, Wow...I have one for you all and hopefully I am not understanding this timer object correctly. I have a timer setup that pulses a connection through a socket every 60 seconds. But it...
4
by: grayaii | last post by:
Hi, I have a simple form that handles all its paint functionality like so: this.SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.Opaque, true); And the entry point to this...
4
by: =?iso-8859-1?B?S2VyZW0gR/xtcvxrY/w=?= | last post by:
Hi, i have a main thread an another worker thread. The main Thread creates another thread and waits for the threads signal to continue the main thread. Everything works inside a ModalDialog and...
3
by: Steve | last post by:
Hi All I am using VB.net 2008 and use timer controls within my applications Question Does the code in a Timer control.tick event run on a different thread to the main Application thread (UI...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.