In ASP.NET AJAX Control toolkit there is an extender known as SlideShowExtender. This can be used to create a Slide show by looping through the images. The images are shown in the SlideShow by using a PageMethod or a Webservice.
Example:
/*Add a script manager in your page */ /*This is the initial image that will be shown to the user*/ /*Drag and Drop a SlideShowExtender*/ /*Description about the image will be shown in this Label*/
/*Previous, Next Button to see the previous, next image and Play and stop button to start and stop the slide show */
The SlideShowExtender uses a page method(GetImagesForSlide).In code behind add the following page method.
[System.Web.Services.WebMethod] [System.Web.Script.Services.ScriptMethod] public static AjaxControlToolkit.Slide[] GetImagesForSlide() { AjaxControlToolkit.Slide[] imgSlide = new AjaxControlToolkit.Slide[4]; /*Provide some images for slide show*/ imgSlide[0] = new AjaxControlToolkit.Slide("images/aa.jpg", "Flower", "Flower"); imgSlide[1] = new AjaxControlToolkit.Slide("images/atlanta.jpg","City", "Atlanta"); imgSlide[2] = new AjaxControlToolkit.Slide("images/img1.jpg","Picture", "Imagine"); imgSlide[3] = new AjaxControlToolkit.Slide("images/logo.png", "Team Logo", "Logo"); return (imgSlide); }
What Extra can be done with SlideShow Extender ——————————————————————-
[1] You can change the time interval between slides at runtime. [2] You can Skip certain Slides based on a condition. [3] You can provide Fade In Fade Out Images. |