By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,742 Members | 793 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,742 IT Pros & Developers. It's quick & easy.

A Timer Problem

P: n/a
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
Share this Question
Share on Google+
6 Replies


P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.