473,668 Members | 2,586 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1971

"ruca" <ru***@iol.pt > wrote in message
news:uN******** ******@TK2MSFTN GP12.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******** ******@TK2MSFTN GP11.phx.gbl...

"ruca" <ru***@iol.pt > wrote in message
news:uN******** ******@TK2MSFTN GP12.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=javasc ript> {window.open('h ttp://www.google.com' );}
</script>"
RegisterStartup Script("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=javasc ript src="liveclock. js"> show_clock() </script>

What I'm doing wrong????

"Cor" <no*@non.com> escreveu na mensagem
news:uG******** ******@TK2MSFTN GP10.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=javasc ript> {window.open('h ttp://www.google.com' );} </script>"
RegisterStartup Script("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=javasc ript> {show_clock();}
</script>"
RegisterStartup Script("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=javasc ript src="liveclock. js"> show_clock() </script>

What I'm doing wrong????

"Cor" <no*@non.com> escreveu na mensagem
news:uG******** ******@TK2MSFTN GP10.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=javasc ript>

{window.open('h ttp://www.google.com' );}
</script>"
RegisterStartup Script("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******** ******@tk2msftn gp13.phx.gbl...
Hi Ruca,

I did not test it, but I think just.

\\\
Dim str As String
str = "<script language=javasc ript> {show_clock();}
</script>"
RegisterStartup Script("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=javasc ript src="liveclock. js"> show_clock() </script>

What I'm doing wrong????

"Cor" <no*@non.com> escreveu na mensagem
news:uG******** ******@TK2MSFTN GP10.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=javasc ript>

{window.open('h ttp://www.google.com' );}
</script>"
RegisterStartup Script("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******** ******@tk2msftn gp13.phx.gbl...
Hi Ruca,

I did not test it, but I think just.

\\\
Dim str As String
str = "<script language=javasc ript> {show_clock();}
</script>"
RegisterStartup Script("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=javasc ript src="liveclock. js"> show_clock() </script>

What I'm doing wrong????

"Cor" <no*@non.com> escreveu na mensagem
news:uG******** ******@TK2MSFTN GP10.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=javasc ript>

{window.open('h ttp://www.google.com' );}
</script>"
RegisterStartup Script("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
6693
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 more precisely? Regards, James Harriman v38zy@unb.ca
13
3281
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 time.time() doesn't appear to be suitable, since time might jump forwards or backwards at the user's whim, if the system clock is reset, or when a daylight savings time change occurs. Using time.clock() doesn't appear to be suitable on Linux,...
8
3404
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 benchmark some function calls for Zope project and when I use t0=time.clock(); foo(); print time.clock()-t0 I get much smaller values than when I use time.clock() (most of them 0.0 but some 0.01) When I use time.time() I get values like...
33
47604
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
61816
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> #include <assert.h> #include <time.h> int main() { clock_t start, stop;
54
3991
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 would not. After careful testing and reprogramming I have optimized the code so it should work every time, however I recommend that you leave the room while it is running and think of something else. It takes about 5 minuets to run so it is...
30
17302
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() well-implemented for the major compilers g++, VC++, and Macintosh compilers and other C++ compilers on Linux/Unix, Windows, and MacOS?
5
5641
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 >>dataFile, timeTaken" or "print >>dataFile,str( timeTaken)", but gives me 0.0. Please tell me what am I missing?
9
8287
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 following to try to determine which. import time # Determine if time.time is better than time.clock # The one with better resolution should be lower.
8
1845
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+ from datetime import * from time import * from visa import *
0
8462
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8381
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8893
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8797
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8583
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
4205
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4380
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2791
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2023
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.