Just wanted to add that I know the Ping() function is being called because I
put a msgbox("Ping function called") within the function and it pops up on
the webpage every 2 seconds. All I want to know is how do I change an image
on the page (stored in an Image object). Changing the ImageURL does not
seem to be doing the trick.
Thanks!
"Ryan" <Tyveil@newsgroups.nospam> wrote in message
news:OEBstcKiGHA.4304@TK2MSFTNGP05.phx.gbl...[color=blue]
> Thanks Steven, this works. However, I have images on my page showing the
> status of the servers being pinged and these images are not being changed
> on the fly. My Ping function changes the ImageURL property based on
> whether the Ping succeeds or fails (green image for success, red for
> failure). Do I have to re-load the entire page just to update a single
> image or is there another way to get just that image to update dynamically
> on the page?
>
> Thanks.
>
>
> "Steven Cheng[MSFT]" <stcheng@online.microsoft.com> wrote in message
> news:m8Cb18EiGHA.5184@TK2MSFTNGXA01.phx.gbl...[color=green]
>> Hello Ryan,
>>
>> As for the timer component, I assume that you're going to perform some
>> constant operations in your ASP.NET application. Is this operation
>> specific to individual webform page or is a application wide
>> operations(like a backgroun worker...)? The article Cor has provided
>> demonstrates how to create javascript client-side timer which will
>> constantly call a script function in the web page's client-sdie html
>> document. However, if what you want is a server-side backgroun timer, I
>> think you would need to create a server-side background worker thread or
>> a
>> System.Timers.Timer instance to do the work .e.g.
>>
>> ==================
>> void Application_Start(object sender, EventArgs e)
>> {
>> Timer timer = new System.Timers.Timer();
>>
>> HttpContext.Current.Application["g_timer"] = timer;
>>
>> timer.Elapsed += new ElapsedEventHandler(this.OnTimedEvent);
>> timer.Interval = 4000;
>> timer.Enabled = true;
>>
>>
>> }
>> ===========================
>>
>> Regards,
>>
>> Steven Cheng
>> Microsoft Online Community Support
>>
>>
>> ==================================================
>>
>> When responding to posts, please "Reply to Group" via your newsreader so
>> that others may learn and benefit from your issue.
>>
>> ==================================================
>>
>>
>> This posting is provided "AS IS" with no warranties, and confers no
>> rights.
>>
>>
>>
>> Get Secure!
www.microsoft.com/security
>> (This posting is provided "AS IS", with no warranties, and confers no
>> rights.)
>>[/color]
>
>[/color]