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

[Solved] Many Ajax Issues

1 Answer 195 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Rational Animal
Top achievements
Rank 1
Rational Animal asked on 15 Oct 2007, 04:15 PM
I think I"m trying to do something really simple but I'm just not getting anywhere and it's driving me nuts.

All I want to do is have a tab control that is hooked up to a multipage control that has a user control on each page.

I don't want the page load event or the rendering of the user controls to happen unless the page is selected and I need to have the user control content automatically update periodically (every 60 seconds)

So I first tried to create a user control that had a script proxy and an ajax panel on it with a timer control inside and the rendering code as well.  It doesn't work because it doesn't like <%%> tags within the panel.

And even if you take the ajax panel off of the user control, the Page_Load event fires even if the Multipage is set to only render only the currently selected page which isn't good and a huge overhead.

So then I created a second user control that gets dropped in the Ajax Panel with the timer. It has a function that is called on the timer's tick event and the tick is set to 1 millisecond at first and then set to 60000 on the first tick right away.  This works fine... for one page!  But then if you click on the tab control to chnage the page, the second one works fine too. But if you go back to the first page the tick is every 60 seconds because it didn't reset/reload the user control and thus is causing issues because I can't find any event that allows me to force the user control to update itself when the page change happens.

That as an aside from the issues with multiple content sections in master pages not working.

What am I doing wrong? This has to be a normal supported scenario, and I'm just not seeing any samples that support this.

1 Answer, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 19 Oct 2007, 10:42 AM

Hi James,

Good news - there is a KB aricle which shows how to do this:

Loading user controls dynamically on TabClick and postback from a loaded user control

Fee free to contact us if you have further questions.


Cheers,
Peter
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Ajax
Asked by
Rational Animal
Top achievements
Rank 1
Answers by
Peter
Telerik team
Share this question
or