How to add an onchange event to the SlideShowExtender?
-After adding your SlideShowExtender, assign the image control to it and setting a BehaviorID
<cc1:SlideShowExtender BehaviorID="behaviorID" ID="SlideShowExtender1" runat="server" SlideShowServiceMethod="GetSlides" PlayInterval="5000" TargetControlID="imgScreen" UseContextKey="True" AutoPlay="true" Loop="true"></cc1:SlideShowExtender>
-Add the following java script code inside your html code file:
<script language="javascript" type="text/javascript">
function pageLoad(){
var slider1;
slider1 = $find("behaviorID");
slider1.add_slideChanging(onSlideChanging);
}
function onSlideChanging(sender, args){
currentSlideIndex = args.get_slideIndex();
//Do what you want using this index
}
</script>
5 comments:
Thanks for this info, I am new to asp.net and to oop in general. How would I go about adding a fade effect to the slides when they change?
here is a good sample:
http://amrelgarhytech.blogspot.com/2008/02/slideshowextender-fade-effect.html
Thanks for the second post, it can also be found here:
http://forums.asp.net/t/1086320.aspx
Yes, i used this example in application of mine as well, its good.
Hi, is it possible to use that index and create a div on the top of the image? so that the div consists of a link. From what I know, it doesn't work with imagemap.
Post a Comment