473,396 Members | 2,090 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,396 software developers and data experts.

Clock at run time

How can I show a run time clock in my ASP .NET page???? Can anyone have any
code to show that?
I have a javscript file that have all necessary code for that, but I'm using
VB in my ASPX page and I can't use javascript like I'm using in my old ASP
page.
In old page I'm using both Vb and Java script. In ASPX I can't, right? How
can I solve this problem?
Can you help me????
--
Thanks (if you help me)
Hope this helps (if I help you)

ruca
Nov 18 '05 #1
7 1960

"ruca" <ru***@iol.pt> wrote in message
news:uN**************@TK2MSFTNGP12.phx.gbl...
How can I show a run time clock in my ASP .NET page???? Can anyone have any code to show that?
I have a javscript file that have all necessary code for that, but I'm using VB in my ASPX page and I can't use javascript like I'm using in my old ASP
page.
In old page I'm using both Vb and Java script. In ASPX I can't, right? How
can I solve this problem?
Can you help me????
--
Thanks (if you help me)
Hope this helps (if I help you)

ruca


A clock would run client-side. What sort of client script code you send to
the browser doesn't interest asp.net. So you can use either C# or VB.Net
(or one of the other .Net languages) server side, and still send javascript
client-side code.
So there should be no problem (unless I missed something ;-)

Hans Kesting
Nov 18 '05 #2
But, how can I do that?? I don't understand very well what you mean.

Sorry

:(

"Hans Kesting" <ne***********@spamgourmet.com> escreveu na mensagem
news:#S**************@TK2MSFTNGP11.phx.gbl...

"ruca" <ru***@iol.pt> wrote in message
news:uN**************@TK2MSFTNGP12.phx.gbl...
How can I show a run time clock in my ASP .NET page???? Can anyone have any
code to show that?
I have a javscript file that have all necessary code for that, but I'm

using
VB in my ASPX page and I can't use javascript like I'm using in my old ASP page.
In old page I'm using both Vb and Java script. In ASPX I can't, right? How can I solve this problem?
Can you help me????
--
Thanks (if you help me)
Hope this helps (if I help you)

ruca


A clock would run client-side. What sort of client script code you send to
the browser doesn't interest asp.net. So you can use either C# or VB.Net
(or one of the other .Net languages) server side, and still send

javascript client-side code.
So there should be no problem (unless I missed something ;-)

Hans Kesting

Nov 18 '05 #3
Cor
Hi Rico

Like this, your Javascript code has to be in the place between the brackets
of course
\\\
Dim str As String
str = "<script language=javascript> {window.open('http://www.google.com');}
</script>"
RegisterStartupScript("Startup", str)
///

I hope this helps a little bit?

Cor

Sorry

:(

Nov 18 '05 #4
Hi Cor,

But I have a file (named: liveclock.js), and in this file I have a function
that I need to call (named: show_clock()) to put a clock at run time in my
page.
Example of my page design:

Hour + Date : 09/01/2004, 16:37:35
User: XPTO
Pin: ******

in hour + date it wil be like this (run time):
09/01/2004, 16:37:35
09/01/2004, 16:37:36
09/01/2004, 16:37:37
09/01/2004, 16:37:38
09/01/2004, 16:37:39
.............
09/01/2004, 16:38:00
I have this way to call "show_clock()", but it's not working:

<script language=javascript src="liveclock.js"> show_clock() </script>

What I'm doing wrong????

"Cor" <no*@non.com> escreveu na mensagem
news:uG**************@TK2MSFTNGP10.phx.gbl...
Hi Rico

Like this, your Javascript code has to be in the place between the brackets of course
\\\
Dim str As String
str = "<script language=javascript> {window.open('http://www.google.com');} </script>"
RegisterStartupScript("Startup", str)
///

I hope this helps a little bit?

Cor

Sorry

:(


Nov 18 '05 #5
Cor
Hi Ruca,

I did not test it, but I think just.

\\\
Dim str As String
str = "<script language=javascript> {show_clock();}
</script>"
RegisterStartupScript("Startup", str)
///
It puts the "str" in your load event and when your javascript already in
your page I think it will direct run after the page is loaded.

I hope it works?

Cor

But I have a file (named: liveclock.js), and in this file I have a function that I need to call (named: show_clock()) to put a clock at run time in my
page.
Example of my page design:

Hour + Date : 09/01/2004, 16:37:35
User: XPTO
Pin: ******

in hour + date it wil be like this (run time):
09/01/2004, 16:37:35
09/01/2004, 16:37:36
09/01/2004, 16:37:37
09/01/2004, 16:37:38
09/01/2004, 16:37:39
............
09/01/2004, 16:38:00
I have this way to call "show_clock()", but it's not working:

<script language=javascript src="liveclock.js"> show_clock() </script>

What I'm doing wrong????

"Cor" <no*@non.com> escreveu na mensagem
news:uG**************@TK2MSFTNGP10.phx.gbl...
Hi Rico

Like this, your Javascript code has to be in the place between the

brackets
of course
\\\
Dim str As String
str = "<script language=javascript>

{window.open('http://www.google.com');}
</script>"
RegisterStartupScript("Startup", str)
///

I hope this helps a little bit?

Cor

Sorry

:(



Nov 18 '05 #6
Don´t work again or I don't put in right place.

I put that in my Page_Load function and not work.
Sorry boring again.

Where should I place that?
--
Thanks (if you help me)
Hope this helps (if I help you)

ruca

"Cor" <no*@non.com> escreveu na mensagem
news:ON**************@tk2msftngp13.phx.gbl...
Hi Ruca,

I did not test it, but I think just.

\\\
Dim str As String
str = "<script language=javascript> {show_clock();}
</script>"
RegisterStartupScript("Startup", str)
///
It puts the "str" in your load event and when your javascript already in
your page I think it will direct run after the page is loaded.

I hope it works?

Cor

But I have a file (named: liveclock.js), and in this file I have a

function
that I need to call (named: show_clock()) to put a clock at run time in my page.
Example of my page design:

Hour + Date : 09/01/2004, 16:37:35
User: XPTO
Pin: ******

in hour + date it wil be like this (run time):
09/01/2004, 16:37:35
09/01/2004, 16:37:36
09/01/2004, 16:37:37
09/01/2004, 16:37:38
09/01/2004, 16:37:39
............
09/01/2004, 16:38:00
I have this way to call "show_clock()", but it's not working:

<script language=javascript src="liveclock.js"> show_clock() </script>

What I'm doing wrong????

"Cor" <no*@non.com> escreveu na mensagem
news:uG**************@TK2MSFTNGP10.phx.gbl...
Hi Rico

Like this, your Javascript code has to be in the place between the

brackets
of course
\\\
Dim str As String
str = "<script language=javascript>

{window.open('http://www.google.com');}
</script>"
RegisterStartupScript("Startup", str)
///

I hope this helps a little bit?

Cor

>
> Sorry
>
> :(
>



Nov 18 '05 #7
Forget!!!!!

After all it works. Thanks.

But can I put when I load that at the beggining of the page and not after
load.
The clock appears after loading all controls of my page and it must be the
first. :)
Thanks again (and again, and again, and again, ..., ..., ..., and again)
ruca
"Cor" <no*@non.com> escreveu na mensagem
news:ON**************@tk2msftngp13.phx.gbl...
Hi Ruca,

I did not test it, but I think just.

\\\
Dim str As String
str = "<script language=javascript> {show_clock();}
</script>"
RegisterStartupScript("Startup", str)
///
It puts the "str" in your load event and when your javascript already in
your page I think it will direct run after the page is loaded.

I hope it works?

Cor

But I have a file (named: liveclock.js), and in this file I have a

function
that I need to call (named: show_clock()) to put a clock at run time in my page.
Example of my page design:

Hour + Date : 09/01/2004, 16:37:35
User: XPTO
Pin: ******

in hour + date it wil be like this (run time):
09/01/2004, 16:37:35
09/01/2004, 16:37:36
09/01/2004, 16:37:37
09/01/2004, 16:37:38
09/01/2004, 16:37:39
............
09/01/2004, 16:38:00
I have this way to call "show_clock()", but it's not working:

<script language=javascript src="liveclock.js"> show_clock() </script>

What I'm doing wrong????

"Cor" <no*@non.com> escreveu na mensagem
news:uG**************@TK2MSFTNGP10.phx.gbl...
Hi Rico

Like this, your Javascript code has to be in the place between the

brackets
of course
\\\
Dim str As String
str = "<script language=javascript>

{window.open('http://www.google.com');}
</script>"
RegisterStartupScript("Startup", str)
///

I hope this helps a little bit?

Cor

>
> Sorry
>
> :(
>



Nov 18 '05 #8

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

Similar topics

3
by: James Harriman | last post by:
Hi, I need to be able to measure a time interval in milliseconds on a windows machine. I have tried using time.clock() but it appears to measure time in seconds...Is there a way to measure time...
13
by: Peter Hansen | last post by:
I would like to determine the "actual" elapsed time of an operation which could take place during a time change, in a platform-independent manner (at least across Linux/Windows machines). Using...
8
by: peterbe | last post by:
What's the difference between time.clock() and time.time() (and please don't say clock() is the CPU clock and time() is the actual time because that doesn't help me at all :) I'm trying to...
33
by: Pushkar Pradhan | last post by:
I'm using clock() to time parts of my code e.g. clk1 = clock(); /* code */ clk2 = clock(); /* calculate time in secs */ ...... clk1 = clock(); /* code */ clk2 = clock();
6
by: Charles M. Reinke | last post by:
I'm using the function clock() to measure the run time of a program so that I can compare among several different algorithms. My code looks like: #include <stdio.h> #include <stdlib.h>...
54
by: CoreyWhite | last post by:
The following experiment is a demonstration of TIME TRAVEL. When writing this program, and testing it out I found that sometimes the program would engage itself in time travel but other times it...
30
by: Matt | last post by:
Does clock_t clock() measure real time or process time? Unless I have missed something, Stroustrup's treatment in TC++PL (section D.4.4.1) is none too clear on that question. Is clock()...
5
by: yinglcs | last post by:
Hi, I am following this python example trying to time how long does an operation takes, like this: My question is why the content of the file (dataFile) is just '0.0'? I have tried "print...
9
by: Ron Adam | last post by:
I'm having some cross platform issues with timing loops. It seems time.time is better for some computers/platforms and time.clock others, but it's not always clear which, so I came up with the...
8
by: Theo v. Werkhoven | last post by:
hi, In this code I read out an instrument during a user determined period, and save the relative time of the sample (since the start of the test) and the readback value in a csv file. #v+...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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.