user3306556
user3306556

Reputation: 9

How to add a timer to c# Web Application in Visual studio 2010

I have a very basic web page built intro page, press start button opens main page, press finish button openings thank you page

I need to insert a timer so that it starts when the user presses the start button on the intro page and stops when they press the finish button on the main page.

Upvotes: 0

Views: 854

Answers (2)

Rocketq
Rocketq

Reputation: 5791

Easiest way is to use DateTime.Now.ToString(), more information MDSN: DateTime.Now Property. So eventually you always can find difference between current and launched time.

Upvotes: 1

Sandman
Sandman

Reputation: 813

You can always use a session variable to store the DateTime.Now value in the intro page and then check the time difference at a later time. That is the most easy thing I think of. Not the most good looking, but the easiest.

Upvotes: 2

Related Questions