Hi Supra,,,
what you want can`t be done from the server side ,,,
however as Cor tried to explain to you this can be done with some client
side script
i have prepared a small demo for you
open a new webform , throw a label on this webform
now in the page load event paste this code
Dim counter As Integer
If IsNothing(Session.Item("counter")) Then
Session.Item("counter") = 0
Else
counter = (Session.Item("counter"))
counter += 1
Session.Item("counter") = counter
End If
If counter <= 9 Then
Dim script As String = "<script language=""JavaScript"">" & _
"setTimeout('window.location.href=window.location.href',1000)</script>"
Page.RegisterStartupScript("refresh", script)
Label1.Text = String.Concat("counting : ", counter.ToString)
ElseIf counter = 10 Then
Label1.Text = String.Concat("well i just counted to ", counter.ToString, " i
feel that this is enough for today")
End If
this will show a counter that stops at 10
i hope this will give you an idea ,
regards
Michel Posseth
"Supra" <(E-Mail Removed)> wrote in message
news:cOmdnUYjgM84DmLfRVn-(E-Mail Removed)...
> where do i put it?..... i got both displayed showinb but not counting
> down. i put this code in button click event
> regards
>
> Dim scriptString As String = "<script language=JavaScript>" & _
> "setclock(); function setclock(){document.images.Image1.src = " & _
>
> "'http://localhost/WebClock/WebForm2.aspx';setTimeout('setclock()',1000)}</script>"
> Page.RegisterStartupScript("setclock", scriptString)
>
>
>
> Cor Ligthert [MVP] wrote:
>
>>Supra,
>>
>>Why you start a new message thread,
>>
>>Please stay in the same message thread, otherwise we start new.
>>
>>I gave you an answer and you ignore that completly
>>
>>Cor
>>
>>
|