473,402 Members | 2,055 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,402 software developers and data experts.

getting client date/time from request

I have a form in which users must enter date and time. The users are
spread out over several timezones and I'd like to load the form with
the date/time of the current user. How do I get the date/time of the
user's client?

Nov 19 '05 #1
2 5520
Use Javascript, registered with Page.RegisterClientBlock.

Juan T. Llibre, ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
Foros de ASP.NET en Español : http://asp.net.do/foros/
======================================
"wapsiii" <wa*****@otmail.com> wrote in message
news:5e********************************@4ax.com...
I have a form in which users must enter date and time. The users are
spread out over several timezones and I'd like to load the form with
the date/time of the current user. How do I get the date/time of the
user's client?

Nov 19 '05 #2

Of course. Thanks. Here is what I did:

' set default from time to client's current time
If (Not Me.IsStartupScriptRegistered(STR_DefaultFromDateSc ript))
Then
Me.RegisterStartupScript(STR_DefaultFromDateScript , "<script
language=JavaScript>d=new Date();document.forms[0].txtFromTime.value =
getHHMM(d,'hh:mm');</script>")
End If

On Mon, 7 Nov 2005 07:37:25 -0400, "Juan T. Llibre"
<no***********@nowhere.com> wrote:
Use Javascript, registered with Page.RegisterClientBlock.

Juan T. Llibre, ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
Foros de ASP.NET en Español : http://asp.net.do/foros/
======================================
"wapsiii" <wa*****@otmail.com> wrote in message
news:5e********************************@4ax.com.. .
I have a form in which users must enter date and time. The users are
spread out over several timezones and I'd like to load the form with
the date/time of the current user. How do I get the date/time of the
user's client?

Nov 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Rod | last post by:
I have been working with ASP.NET 1.1 for quite a while now. For some reason, opening some ASP.NET applications we wrote is producing the following error message: "The Web server reported...
3
by: opticstorm | last post by:
i want to know is that is it possible to get a web clients date format i.e. like (DD/MM/YY) or (YYYY/MM/DD) from asp.net. or any other client scripting languages like jscript,javascript. no perl...
8
by: bryan | last post by:
Is there any way I can get the application path (the one returned by Request.ApplicationPath) in the Application_Start method in Global.asax? Request is not valid there. On a related note, is there...
5
by: | last post by:
Hi all, HttpWebRequest, and SoapHttpClientProtocol both expose a ClientCertificates property, which can hold multiple client certificates, but on the service side, it can only receive one client...
1
by: simbarashe | last post by:
Hie could someone please help me with getting and using the current page url. I have a function that gets the url, I want to use it with header(location : XXX) but it wont work. The code is as...
4
by: Olivier Matrot | last post by:
Hello, I have a problem with an ASP.NET 2.0 Application. A client request is processed in parrallel by two threads. This ends with the following exception : <Source>System</Source> <StackTrace...
1
by: Olivier Matrot | last post by:
I have a problem with an ASP.NET 2.0 Application. A client request is processed in parrallel by two threads. After further analysis, it appears that : - There is 2 disctinct session for the...
5
by: =?Utf-8?B?TWFyaw==?= | last post by:
Hi... I've got a .Net client to a soap service that works for the most part, but there are a couple of things I'd like to improve: 1) the first request to the client wrapper always takes...
0
by: dantz | last post by:
Can someone please help me on how can I get the interval time of the client's request? Or maybe just the Date and Time how can I get the time when the client sent the http request using...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.