In "/Home/Index.cshtml", when users input the hour,minute,second and then click on the Start button, the inputs are submitted to PostCountdownTimer
action in Home
controller. In the action, we get the end time by adding hour,minute,second to DateTime.Now
and assign this end time value to Session["EndTime"]
. Then, assign Session["EndTime"]
value to TempData["EndTime"]
because TempData["EndTime"]
value is going to be used in the script section of "/Home/Index.cshtml" to calculate the duration of the time now with the TempData["EndTime"] and display the remaining time every single second.
- Enter Hour, Minute, Second that you need to be counting down from
- Display remaining time
- Display popup when times up
- Play audio when times up
- Reset Timer