473,399 Members | 3,106 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,399 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 5519
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.