Click here to Skip to main content
15,918,976 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi,

I wanted to know is there a way where even when local system date time is changed to some other date time, the date time value displayed in page of website should not change and it should be running and showing.

For example: date value is dec 12, 2015 10:30:00 AM in server if system date time changes to dec 1, 2015 09:00:00 PM in local system and once clicked on refresh the value in webpage should show dec 12, 2015 10:30:00 AM

Means should show only server current date time in web page

please suggest, is this possible

Thanks in advance
Posted
Updated 18-Dec-15 4:49am
v3

1 solution

Yes, just use C# code to put the current time in a label, for example.

C#
lblTime.Text = DateTime.Now;


Of course it won't update unless you refresh the page or if you use setTimeout in JavaScript to call the server to get the time at an interval.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900