Reputation: 3
Im trying to disable a page which is opened while clicking a hyperlink in my application. My application is developed using VB.Net. Can we use Timer function?
Upvotes: 0
Views: 64
Reputation: 2822
There are several ways to display a maintenance notification message. My preferred method is to use a database table called MaintenanceNotification.
Then, when you load the page, check the database for an existing notification, if there is one, handle appropriately.
**MaintenanceNotification**
MaintenanceNotificationId
StartDate
EndDate
Message
Comments
EDIT
To show a message at the same time every day, when the page loads, compare DateTime.Now.TimeOfDay to the time you want the messaged displayed (use a TimeSpan).
Psuedo Code:
If DateTime.Now.TimeOfDay is >= start time AND ALSO DateTime.Now.TimeOfDay <= end time THEN
'display the message.
END IF
Upvotes: 1