I have a .NET page that has a RadRotator on it, displaying a series of images. I also have a "Refresh" button that, when pressed, uses a RadAjaxManager to look for more images to display, and if found, adds them to the RadRotator. This all works beautifully.
However, I have a second component that is causing issues. My RadRotator has a "Previous" and "Next" button that I control from code. When these buttons are pressed they trigger the RadRotator to rotate, and then display a brief text explanation of the current image elsewhere on the page. Both of these actions are achieved through Javascript: the rotator using the Client-Side API, and the text using an .innerHtml replace on an asp:Label. The actual text comes from a Javascript array that I set the contents of using a <%= %> code block on page load.
Here's the problem: I can't get RadAjaxManager to update the code block so that the javascript array contains an updated list of text explanations at the same time that more images are bound to the RadRotator.
Possible Solutions:
1. Find some way to get RadAjaxManager to re-evaluate a block of javascript code containing an ASP.NET code block (Preferred)
2. Move the array of text explanations out of javascript and into some variable in the code-behind, then trigger a partial callback ever time the Previous/Next buttons are clicked to access it (Not preferable, because the Javascript solutions never has to contact the server)
I tried setting the RadAjaxManager to target the RadCodeBlock that my Javascript is contained in to see if that would work, no luck with that.
Any insight is appreciated, and have a happy New Year!
However, I have a second component that is causing issues. My RadRotator has a "Previous" and "Next" button that I control from code. When these buttons are pressed they trigger the RadRotator to rotate, and then display a brief text explanation of the current image elsewhere on the page. Both of these actions are achieved through Javascript: the rotator using the Client-Side API, and the text using an .innerHtml replace on an asp:Label. The actual text comes from a Javascript array that I set the contents of using a <%= %> code block on page load.
Here's the problem: I can't get RadAjaxManager to update the code block so that the javascript array contains an updated list of text explanations at the same time that more images are bound to the RadRotator.
Possible Solutions:
1. Find some way to get RadAjaxManager to re-evaluate a block of javascript code containing an ASP.NET code block (Preferred)
2. Move the array of text explanations out of javascript and into some variable in the code-behind, then trigger a partial callback ever time the Previous/Next buttons are clicked to access it (Not preferable, because the Javascript solutions never has to contact the server)
I tried setting the RadAjaxManager to target the RadCodeBlock that my Javascript is contained in to see if that would work, no luck with that.
Any insight is appreciated, and have a happy New Year!