1 Previous Next 

AspNet: Astro Boys Live clock in VB.Net


Astro Boy has made a live clock in JavaScript. Here is showed how this can be used in code behind from ASPNET. For this sample is only needed a long label on a webpage and than run Private Sub Page_Load(ByVal sender As Object, ByVal e _
   As System.EventArgs) Handles MyBase.Load
   Dim str As String = "<script language=javascript >" & _
   "src='http://www.zip.com.au/~astroboy/liveclock/liveclock.js '>" & _
   "show_clock()</ script>"
   Page.RegisterClientScriptBlock("LiveClock", str)
   Label1.Text = _
   "<script language='javascript'>new LiveClock(); </ script>"
End Sub

'To use it this way is of course not fair, I here it is done to make
'the sample easy to show.
'It is nicer to download the script from Astro Boys website and
'than put it in your own project (IIS file)
'While Astro boy gives as well samples
'how to use it to let it look nicer if you use the link bellow

'http://www.zipworld.com.au/~astroboy/liveclock/



1 Previous Next