|
-
Jan 14th, 2004, 11:58 PM
#1
Thread Starter
Lively Member
current time shows on web form
Does anybody know how to make the current time shows on the web form (WebForm1.aspx)?
I have tried the following code: label1.text = TimeofDay. And it did show on the form "example: 9:50:52 PM", but it stays the same and will not show the new time until the form reloads again. In other words, the time is not alive. I'd like to see the second interval ticking.
any idea, anyone?
P.S: Time function (Label1.Caption = Time) will not work on the web form, it only works on VB6 desktop app.
Thanks.
-
Jan 15th, 2004, 12:00 AM
#2
Frenzied Member
You are gonna have to use JavaScript for that to work like that.
-
Jan 15th, 2004, 12:43 AM
#3
Thread Starter
Lively Member
You mean there is no way that can done in VB.NET. Even if we use Timer component?
Hummmm.
-
Jan 15th, 2004, 06:01 AM
#4
The only way to do this in net is to reload the page at a certain interval, which is not very userfriendly.
You can't make this serverside.
As DevGrp said, you need JavaScript or VBScript to do this.
Make a <DIV ID="MyClock">x</DIV> or simliar.
In a timerevent in Java or VBS you can user the MyClock.InnerHTML=WhateverTheTimeSyntaxIsForYouSelectedLanguage
I'm not able to test this, but I think this should be enough to push you in the right direction.
I wish I could think of something witty to put in my sig...
...Currently using VS2013...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|