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

A Timer Problem

Hi Everybody
I want to create a timer event on my web page. Something equivalent to setTimeOut in JavaScript. I read the MSDN but still cannot make one :

I tried the following but nothing happens. Can someone tell me what i am missing ? :
<%@ Page Language="vb" %>
<%@Import NameSpace="System.Timers" %>

<script runat="server">
Sub Page_Load(Sender As Object, e As EventArgs)
txtSamay.Text = Now()
StartTimer()
End Sub

Sub StartTimer()
Dim myTimer as New System.Timers.Timer()
myTimer.Enabled = true
myTimer.Interval = 2000
AddHandler myTimer.Elapsed, AddressOf myTimer_Elapsed
End Sub

Sub myTimer_Elapsed(ByVal sender As Object, ByVal e as ElapsedEventArgs)
txtSamay.Text = Now()
End Sub
</script>

<html>
<head></head>
<body>

<form runat="server">
<asp:Label ID="Label_1" runat="server"></asp:Label><BR>
<asp:Textbox ID="txtSamay" runat="server"></asp:Textbox>
</form>
</body>
</html>

Nov 18 '05 #1
6 1344
what's the deal with posting this all over the internet?

--
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
"Ing. Rajesh Kumar" <iambad(WithoutThis)@post.cz> wrote in message news:%2****************@tk2msftngp13.phx.gbl...
Hi Everybody
I want to create a timer event on my web page. Something equivalent to setTimeOut in JavaScript. I read the MSDN but still cannot make one :

I tried the following but nothing happens. Can someone tell me what i am missing ? :
<%@ Page Language="vb" %>
<%@Import NameSpace="System.Timers" %>

<script runat="server">
Sub Page_Load(Sender As Object, e As EventArgs)
txtSamay.Text = Now()
StartTimer()
End Sub

Sub StartTimer()
Dim myTimer as New System.Timers.Timer()
myTimer.Enabled = true
myTimer.Interval = 2000
AddHandler myTimer.Elapsed, AddressOf myTimer_Elapsed
End Sub

Sub myTimer_Elapsed(ByVal sender As Object, ByVal e as ElapsedEventArgs)
txtSamay.Text = Now()
End Sub
</script>

<html>
<head></head>
<body>

<form runat="server">
<asp:Label ID="Label_1" runat="server"></asp:Label><BR>
<asp:Textbox ID="txtSamay" runat="server"></asp:Textbox>
</form>
</body>
</html>

Nov 18 '05 #2
Hi
I am sorry but I did not understand what do you mean.
Can you explain ? All the code is already posted in the group.
Thanks
Raja
"Alvin Bruney [MVP]" <vapor at steaming post office> wrote in message news:uK**************@TK2MSFTNGP10.phx.gbl...
what's the deal with posting this all over the internet?

--
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
"Ing. Rajesh Kumar" <iambad(WithoutThis)@post.cz> wrote in message news:%2****************@tk2msftngp13.phx.gbl...
Hi Everybody
I want to create a timer event on my web page. Something equivalent to setTimeOut in JavaScript. I read the MSDN but still cannot make one :

I tried the following but nothing happens. Can someone tell me what i am missing ? :
<%@ Page Language="vb" %>
<%@Import NameSpace="System.Timers" %>

<script runat="server">
Sub Page_Load(Sender As Object, e As EventArgs)
txtSamay.Text = Now()
StartTimer()
End Sub

Sub StartTimer()
Dim myTimer as New System.Timers.Timer()
myTimer.Enabled = true
myTimer.Interval = 2000
AddHandler myTimer.Elapsed, AddressOf myTimer_Elapsed
End Sub

Sub myTimer_Elapsed(ByVal sender As Object, ByVal e as ElapsedEventArgs)
txtSamay.Text = Now()
End Sub
</script>

<html>
<head></head>
<body>

<form runat="server">
<asp:Label ID="Label_1" runat="server"></asp:Label><BR>
<asp:Textbox ID="txtSamay" runat="server"></asp:Textbox>
</form>
</body>
</html>

Nov 18 '05 #3
Hi
I am sorry but I did not understand what do you mean.
Can you explain ? All the code is already posted in the group.
Thanks
Raja
"Alvin Bruney [MVP]" <vapor at steaming post office> wrote in message news:uK**************@TK2MSFTNGP10.phx.gbl...
what's the deal with posting this all over the internet?

--
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
"Ing. Rajesh Kumar" <iambad(WithoutThis)@post.cz> wrote in message news:%2****************@tk2msftngp13.phx.gbl...
Hi Everybody
I want to create a timer event on my web page. Something equivalent to setTimeOut in JavaScript. I read the MSDN but still cannot make one :

I tried the following but nothing happens. Can someone tell me what i am missing ? :
<%@ Page Language="vb" %>
<%@Import NameSpace="System.Timers" %>

<script runat="server">
Sub Page_Load(Sender As Object, e As EventArgs)
txtSamay.Text = Now()
StartTimer()
End Sub

Sub StartTimer()
Dim myTimer as New System.Timers.Timer()
myTimer.Enabled = true
myTimer.Interval = 2000
AddHandler myTimer.Elapsed, AddressOf myTimer_Elapsed
End Sub

Sub myTimer_Elapsed(ByVal sender As Object, ByVal e as ElapsedEventArgs)
txtSamay.Text = Now()
End Sub
</script>

<html>
<head></head>
<body>

<form runat="server">
<asp:Label ID="Label_1" runat="server"></asp:Label><BR>
<asp:Textbox ID="txtSamay" runat="server"></asp:Textbox>
</form>
</body>
</html>

Nov 18 '05 #4
you only need to post to one newsgroup. You've posted this thread to

microsoft.public.certification.visualstudio,
microsoft.public.dotnet.framework.aspnet,
microsoft.public.in.aspdotnet,
microsoft.public.in.dotnet,
microsoft.public.in.dotnet.framework,
microsoft.public.in.vbdotnet

Firstly it is bad manners.
Secondly, the threads aren't consolidated so that when you search for a solution you get many different threads which makes finding an answer a lot more time consuming than it should be. Trust me, if you post it to one newsgroup, it will be seen. The experts in here monitor several different newsgroups at a time which is why it pisses people off to see the same thing in multiple newsgroups. Please see the micrsoft guidelines for posting to online newsgroups if you care to find out more.
--
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
"Ing. Rajesh Kumar" <iambad(WithoutThis)@post.cz> wrote in message news:uh*************@TK2MSFTNGP11.phx.gbl...
Hi
I am sorry but I did not understand what do you mean.
Can you explain ? All the code is already posted in the group.
Thanks
Raja
"Alvin Bruney [MVP]" <vapor at steaming post office> wrote in message news:uK**************@TK2MSFTNGP10.phx.gbl...
what's the deal with posting this all over the internet?

--
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
"Ing. Rajesh Kumar" <iambad(WithoutThis)@post.cz> wrote in message news:%2****************@tk2msftngp13.phx.gbl...
Hi Everybody
I want to create a timer event on my web page. Something equivalent to setTimeOut in JavaScript. I read the MSDN but still cannot make one :

I tried the following but nothing happens. Can someone tell me what i am missing ? :
<%@ Page Language="vb" %>
<%@Import NameSpace="System.Timers" %>

<script runat="server">
Sub Page_Load(Sender As Object, e As EventArgs)
txtSamay.Text = Now()
StartTimer()
End Sub

Sub StartTimer()
Dim myTimer as New System.Timers.Timer()
myTimer.Enabled = true
myTimer.Interval = 2000
AddHandler myTimer.Elapsed, AddressOf myTimer_Elapsed
End Sub

Sub myTimer_Elapsed(ByVal sender As Object, ByVal e as ElapsedEventArgs)
txtSamay.Text = Now()
End Sub
</script>

<html>
<head></head>
<body>

<form runat="server">
<asp:Label ID="Label_1" runat="server"></asp:Label><BR>
<asp:Textbox ID="txtSamay" runat="server"></asp:Textbox>
</form>
</body>
</html>

Nov 18 '05 #5
Hi all,

I have the same problem Whats the solution.......Please......?

Regards

Janaka
"Alvin Bruney [MVP]" <vapor at steaming post office> wrote in message news:uJ**************@TK2MSFTNGP09.phx.gbl...
you only need to post to one newsgroup. You've posted this thread to

microsoft.public.certification.visualstudio,
microsoft.public.dotnet.framework.aspnet,
microsoft.public.in.aspdotnet,
microsoft.public.in.dotnet,
microsoft.public.in.dotnet.framework,
microsoft.public.in.vbdotnet

Firstly it is bad manners.
Secondly, the threads aren't consolidated so that when you search for a solution you get many different threads which makes finding an answer a lot more time consuming than it should be. Trust me, if you post it to one newsgroup, it will be seen. The experts in here monitor several different newsgroups at a time which is why it pisses people off to see the same thing in multiple newsgroups. Please see the micrsoft guidelines for posting to online newsgroups if you care to find out more.
--
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
"Ing. Rajesh Kumar" <iambad(WithoutThis)@post.cz> wrote in message news:uh*************@TK2MSFTNGP11.phx.gbl...
Hi
I am sorry but I did not understand what do you mean.
Can you explain ? All the code is already posted in the group.
Thanks
Raja
"Alvin Bruney [MVP]" <vapor at steaming post office> wrote in message news:uK**************@TK2MSFTNGP10.phx.gbl...
what's the deal with posting this all over the internet?

--
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
"Ing. Rajesh Kumar" <iambad(WithoutThis)@post.cz> wrote in message news:%2****************@tk2msftngp13.phx.gbl...
Hi Everybody
I want to create a timer event on my web page. Something equivalent to setTimeOut in JavaScript. I read the MSDN but still cannot make one :

I tried the following but nothing happens. Can someone tell me what i am missing ? :
<%@ Page Language="vb" %>
<%@Import NameSpace="System.Timers" %>

<script runat="server">
Sub Page_Load(Sender As Object, e As EventArgs)
txtSamay.Text = Now()
StartTimer()
End Sub

Sub StartTimer()
Dim myTimer as New System.Timers.Timer()
myTimer.Enabled = true
myTimer.Interval = 2000
AddHandler myTimer.Elapsed, AddressOf myTimer_Elapsed
End Sub

Sub myTimer_Elapsed(ByVal sender As Object, ByVal e as ElapsedEventArgs)
txtSamay.Text = Now()
End Sub
</script>

<html>
<head></head>
<body>

<form runat="server">
<asp:Label ID="Label_1" runat="server"></asp:Label><BR>
<asp:Textbox ID="txtSamay" runat="server"></asp:Textbox>
</form>
</body>
</html>

Nov 18 '05 #6
oops sorry I have reply to the wrong group.....
"Janaka Wijayakoon" <ja******@guidedogs.ans.au> wrote in message news:OP**************@TK2MSFTNGP10.phx.gbl...
Hi all,

I have the same problem Whats the solution.......Please......?

Regards

Janaka
"Alvin Bruney [MVP]" <vapor at steaming post office> wrote in message news:uJ**************@TK2MSFTNGP09.phx.gbl...
you only need to post to one newsgroup. You've posted this thread to

microsoft.public.certification.visualstudio,
microsoft.public.dotnet.framework.aspnet,
microsoft.public.in.aspdotnet,
microsoft.public.in.dotnet,
microsoft.public.in.dotnet.framework,
microsoft.public.in.vbdotnet

Firstly it is bad manners.
Secondly, the threads aren't consolidated so that when you search for a solution you get many different threads which makes finding an answer a lot more time consuming than it should be. Trust me, if you post it to one newsgroup, it will be seen. The experts in here monitor several different newsgroups at a time which is why it pisses people off to see the same thing in multiple newsgroups. Please see the micrsoft guidelines for posting to online newsgroups if you care to find out more.
--
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
"Ing. Rajesh Kumar" <iambad(WithoutThis)@post.cz> wrote in message news:uh*************@TK2MSFTNGP11.phx.gbl...
Hi
I am sorry but I did not understand what do you mean.
Can you explain ? All the code is already posted in the group.
Thanks
Raja
"Alvin Bruney [MVP]" <vapor at steaming post office> wrote in message news:uK**************@TK2MSFTNGP10.phx.gbl...
what's the deal with posting this all over the internet?

--
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
"Ing. Rajesh Kumar" <iambad(WithoutThis)@post.cz> wrote in message news:%2****************@tk2msftngp13.phx.gbl...
Hi Everybody
I want to create a timer event on my web page. Something equivalent to setTimeOut in JavaScript. I read the MSDN but still cannot make one :

I tried the following but nothing happens. Can someone tell me what i am missing ? :
<%@ Page Language="vb" %>
<%@Import NameSpace="System.Timers" %>

<script runat="server">
Sub Page_Load(Sender As Object, e As EventArgs)
txtSamay.Text = Now()
StartTimer()
End Sub

Sub StartTimer()
Dim myTimer as New System.Timers.Timer()
myTimer.Enabled = true
myTimer.Interval = 2000
AddHandler myTimer.Elapsed, AddressOf myTimer_Elapsed
End Sub

Sub myTimer_Elapsed(ByVal sender As Object, ByVal e as ElapsedEventArgs)
txtSamay.Text = Now()
End Sub
</script>

<html>
<head></head>
<body>

<form runat="server">
<asp:Label ID="Label_1" runat="server"></asp:Label><BR>
<asp:Textbox ID="txtSamay" runat="server"></asp:Textbox>
</form>
</body>
</html>

Nov 18 '05 #7

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

Similar topics

13
by: Manuel Lopez | last post by:
I have a puzzling form timer problem that I didn't experience prior to Access 2003 (though I'm not sure access 2003 is to blame). Here's the situation: a computer has two access 2003 databases on...
9
by: HL | last post by:
I am using VS 2005 Beta - C# Problem: The Timer fires a few milliseconds before the actual Due-Time Let's say a timer is created in the following manner: System.Threading.Timer m_timer = null;...
4
by: grayaii | last post by:
Hi, I have a simple form that handles all its paint functionality like so: this.SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.Opaque, true); And the entry point to this...
8
by: KnighT | last post by:
I have a .net service that runs a System.Threading.Timer. The delegate points to the function that the service should execute when the timer elapses. Problem: The timer is not ticking. I have...
8
by: =?Utf-8?B?RGF2ZSBCb29rZXI=?= | last post by:
I have a Timer that I set to go off once a day, but it frequently fails! In order to debug I would like to be able to check, at any moment, whether the Timer is enabled and when it will next...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.