How can I get the user's Date time in asp.net?
If the user's machine time is not configured correctly then JavaScript is useless. Is there any other solution?
How can I get the user's Date time in asp.net?
If the user's machine time is not configured correctly then JavaScript is useless. Is there any other solution?
If you're trying to display the user's local date/time, you could detect/request for their timezone and then calculate their local time from there. Remember to include DST preferences to ensure accuracy. There are plenty of forums out there with this feature, such as this one.
Lookup his IP, and try to get the timezone based on the IP, then you can get somewhat accurate time of the user, unless the user is using a proxy to browse your website. Making the user access your site via https:// can also help, if he tries to change the dates too drastically, as it will throw a SSL certificate error in his browser.