This is a migrated thread and some comments may be shown as answers.

[Solved] RadAjaxManager

2 Answers 69 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
fredn
Top achievements
Rank 1
fredn asked on 14 Apr 2009, 04:51 PM
Hi,

I have a timer which ticks every 10s, and I want to refresh an asp:image ( its ImageUrl property ).
I've tried to add a RadAjaxManager and add :
            <telerik:AjaxSetting AjaxControlID="MyTimer">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="MyImage" />
                </UpdatedControls>
            </telerik:AjaxSetting>

I change the ImageUrl in the tick of the timer.
The thing is that the image is never changing...

Any Ideas ?

2 Answers, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 16 Apr 2009, 12:48 PM
Hello Fred,

I am sending you a small runnable application with the implementation request by you. Give it a try and let me know if it works for you or if I am leaving something out.

Kind regards,
Pavlina
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
fredn
Top achievements
Rank 1
answered on 16 Apr 2009, 01:47 PM
Hi,

First of all, your example works fine and thanks to take of your time to build it.
I've released that I've made some mistakes in my ajax settings. It was not so simple as I sent in my post, to simplify I had something like this :

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"
            <AjaxSettings> 
                <telerik:AjaxSetting AjaxControlID="Timer1"
                    <updatedcontrols> 
                    <telerik:AjaxUpdatedControl ControlID="Image1" /> 
                    <telerik:AjaxUpdatedControl ControlID="Panel1" /> 
                     
                    </updatedcontrols> 
                </telerik:AjaxSetting> 
            </AjaxSettings> 
        </telerik:RadAjaxManager> 
         
        <asp:Panel ID="Panel1" runat="server"
            <asp:Image ID="Image1" runat="server" ImageUrl="~/Images/Update.gif" /> 
        </asp:Panel> 
        <asp:Timer ID="Timer1" runat="server" Interval="1000" OnTick="Timer1_Tick"
        </asp:Timer> 

And this doesn't work as the Image1 is before the Panel1 in my ajaxsettings...
I can then just put Panel1 OR Image1 OR Panel1 then Image1 to make it works...

So it works now.
Thanks for your response !
Tags
Ajax
Asked by
fredn
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
fredn
Top achievements
Rank 1
Share this question
or