Ajax Slide Show Extender

Ratings:
(4)
Views: 683
Banner-Img
Share this blog:

Slide Show Extender

This control is used to create a slideshow of images and allow the user to navigate between the slides next and previous and also play the slide at specified intervals. Properties  TargetContorlID: ImagedescriptionLabelID : Used to specify the ID of the label in which you want to display description of the current image. ImageTitleLabelID : Used to specify ID of the label in which you want to display title of the current image. Next Button ID : Used to specify ID of the Button that is used to move to the next slide. previousButton Id : Used to specify ID of the button to use to move to the previous slide. playButtonID : Used to specify ID of the Button to use to play the slideshow. PlayButton Text : Used to set a caption for the play button. StopButtonText : Used to set a caption for stop button. PlayInterval : Used to specify the interval in milli seconds at which the slide as to be changed when you start playing the slide show. SlideshowserviceMethod : Used to specify a method name that will return the images to display in the slideshow as slide array. Loop : Indicates whether or not the slideshow will continuous in a loop without stopping after playing it for once.

Example

The following example demonstrates how to use the slideshow extender. Add a page to the website and then place a ToolkitscriptManager on it & then a panel & design the panel as follows.   Screenshot_90   Within the HTML source of the page drag & drop a slideshow extender and set following properties for it. <asp:slideshowextender  Id=”slideshowExtender” runat=”server” imageDescriptionLableID=”L2” ImageTitleLabelID=”L1”  NextButtonId=”Btnnext”  playButtonText=”play”  playbuttonID=”Btnplay” stopButtonText=”stop” previousButtonID=”btnprev” playinterval=”3000” slideshowservicemethod=”Getimages” usecontextkey=”True” Loop=”true” > </asp:slideshowExtender> Within the design of the page click on the smart tag and choose “ Add slideshow pageMethod” option that will create a method in the code with the same name as the method name you set for the slide show service method property of the slideshowextender write the following code within that method. using system.AjaxcontrolToolkit; public static…. { return new slide[] { new slide(“Image/Desert.jpg” ,”Desert”, “This is Desert Image”); new slide(“images/Lighthouse.jpg”,”Lighthouse” . “This is lighthouse image”); new slide(“Images/penguins.jpg”,”penguins”,”This is LighthouseImage”); new slide(“Images/Tulips.jpg”,”koala”,”This is koala Image”) }; } At runtime by default first image will be displayed in image control & by clicking on next button you can move to the next slide, by clicking on previous button you can move the previous slide & by clicking on play button you can play the slideshow at the interval specified with playInteraval property.

You liked the article?

Like: 0

Vote for difficulty

Current difficulty (Avg): Medium

EasyMediumHardDifficultExpert
IMPROVE ARTICLEReport Issue

About Author

Authorlogo
Name
TekSlate
Author Bio

TekSlate is the best online training provider in delivering world-class IT skills to individuals and corporates from all parts of the globe. We are proven experts in accumulating every need of an IT skills upgrade aspirant and have delivered excellent services. We aim to bring you all the essentials to learn and master new technologies in the market with our articles, blogs, and videos. Build your career success with us, enhancing most in-demand skills in the market.

Stay Updated
Get stories of change makers and innovators from the startup ecosystem in your inbox