I wanted to set the SlideShowExtender current image, i found just one good way to do so using simple java script code
1- Add the SlideShowExtender:
<cc1:SlideShowExtender BehaviorID="behaviorID" ID="SlideShowExtender1" runat="server"
SlideShowServiceMethod="GetSlides" PlayInterval="9000" TargetControlID="imgScreen"
UseContextKey="True" AutoPlay="true" Loop="true">
</cc1:SlideShowExtender>
function changeImage(imgUrl, imageIndex){
slider1 = $find("behaviorID");
slider1._currentIndex = imageIndex-1;
slider1.setCurrentImage = imgUrl;
}
2 comments:
It's not working like that, you don't need to set the image url, only you change the current image index and call the setCurrentImage function to update the image at the new index just set, you're using setCurrentImage as a property while it's a function that takes no parameters.
function changeImage(imageIndex){
slider1 = $find("behaviorID");
slider1._currentIndex = imageIndex;
slider1.setCurrentImage();
}
Thank you! It works...
Post a Comment