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
Jump to Post
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
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.