I have a asp.net c# web form, when the page load I want to display client computer date and time.I used DateTime.Now.Date() for this. it works well in the localhost, but after I deployed in the web server it displays web server date and time.how can I display client's computer date and time? :o
aish
0
Light Poster
Recommended Answers
Jump to PostUse a Javascript,
Cuz this runs in the client browser.
Check out this code..var Days = new Array('Sunday','Monday','Tuesday','Wednesday', 'Thursday','Friday','Saturday'); var today = new Date(); var Year = takeYear(today); var Month = leadingZero(today.getMonth()+1); var DayName = Days[today.getDay()]; var Day = leadingZero(today.getDate()); var Hours = leadingZero(today.getHours()); var Minutes …
All 4 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.