---
title: "Ajax Toolkit SlideShowExtender Control in ASP.Net"  
description: "SlideShow is an Extender that targets image controls. You can provide it with buttons to hit previous, next and play. You can configure the slideshow"  
author: "Anonymous User"  
published: 2010-12-06  
updated: 2020-03-04  
canonical: https://www.mindstick.com/articles/281/ajax-toolkit-slideshowextender-control-in-asp-dot-net  
category: "ajax"  
tags: ["ajax"]  
reading_time: 2 minutes  

---

# Ajax Toolkit SlideShowExtender Control in ASP.Net

SlideShow is an Extender that [targets](https://yourviews.mindstick.com/view/81357/us-president-donald-trump-targets-china-yet-again) image controls. You can provide it with buttons to hit [previous](https://yourviews.mindstick.com/view/81421/unlock-2-0-is-just-like-previous-corona-lockdowns), next and play. You can configure the slideshow to play automatically on render, allow it loop through the images in a [round robin](https://www.mindstick.com/forum/157665/explain-the-round-robin-scheduling-algorithm-with-an-example-in-os) [fashion](https://www.mindstick.com/articles/279859/how-to-pursue-a-career-in-fashion-exploring-your-options) and also set the interval for slide transitions.

\

**SlideShow [Properties](https://yourviews.mindstick.com/view/81845/now-it-s-possible-to-predict-properties-of-any-molecule):**

· TargetControlID: ID of the [Image control](https://www.mindstick.com/forum/95341/how-can-use-upload-image-control-in-asp-dot-net) to display the images of SlideShow program.

· NextButtonID - ID of the [button](https://www.mindstick.com/articles/63/how-to-add-button-in-datagridview-in-csharp-dot-net) that will allow you to see the next [picture](https://answers.mindstick.com/qa/34495/what-was-best-picture-of-the-year-of-the-second-los-angeles-olympics).

· PlayButtonID - ID of the button that will allow you to play/stop the slideshow.

· PreviousButtonID - ID of the button that will allow you to see the previous picture.

· PlayButtonText - The text to be shown in the play button to play the slideshow.

· StopButtonText - The text to be shown in the play button to stop the slideshow.

· PlayInterval - Interval in milliseconds between slide transitions in play mode.

· ImageTitleLabelID - ID of Label displaying current picture's title.

· ImageDescriptionLabelID - ID of Label describing current picture.

· Loop - Setting this to true will allow you to view images in a round-robin fashion.

· AutoPlay - Setting this to true will play the slideshow automatically on render.

## Code:

```
 <%-- ScriptManager control manages client script for AJAX enabled ASP.NET pages.This enables partial-page rendering and Web-service calls.You have to used this if you want to use ajax control toolkit--%><asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager><br /><asp:Label ID="Label1" runat="server" Text=""></asp:Label><asp:Label ID="Label2" runat="server" Text=""></asp:Label><br /><table class="style1"><tr><td>&nbsp;</td><td><asp:Image ID="Image1" runat="server" />  <cc1:SlideShowExtender ID="SlideShowExtender1" runat="server" AutoPlay="true" TargetControlID="Image1" SlideShowServiceMethod="Slides"  ImageTitleLabelID="Label1" NextButtonID="Btn_Next" PlayButtonID="Btn_Play" StopButtonText="stop" Loop="true" ImageDescriptionLabelID="Label2"PlayButtonText="play"></cc1:SlideShowExtender>  </td><td>&nbsp; </td></tr>  <tr><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>  <tr><td>&nbsp;</td><td style="text-align: center">  <asp:Button ID="Btn_Previous" runat="server" Text="Previous" />  &nbsp;<asp:Button ID="Btn_Play" runat="server" Text="Play" />  &nbsp;<asp:Button ID="Btn_Next" runat="server" Text="Next" />  </td>   <td>&nbsp;</td></tr></table>
```

Here SlideShowServiceMethodis "Slides" which defined in script tag

```
<Head><script runat="Server" type="text/C#"> [System.Web.Services.WebMethod] [System.Web.Script.Services.ScriptMethod]   public static AjaxControlToolkit.Slide[] Slides() {    AjaxControlToolkit.Slide[] slides = new AjaxControlToolkit.Slide[3];    slides[0] = new AjaxControlToolkit.Slide("images/banner3.jpg", "", "");    slides[1] = new AjaxControlToolkit.Slide("images/banner4.jpg", "", ""); slides[2] = new AjaxControlToolkit.Slide("images/DudeTopBanner.gif","", "");      return (slides);  } </script></Head>
```

**Run the [project](https://yourviews.mindstick.com/story/1788/things-to-ensure-your-construction-project-is-successful)**

![AjaxControl Toolkit SlideShowExtender Control in ASP.Net](https://www.mindstick.com/mindstickarticle/dd45ecf1-34f7-4157-853e-f8e13808d376/images/daffda87-c714-4754-8ea9-c480185dcc15.png)

When you click next button then next image will show and when you click previous button then previous image will show. If you have specified **AutoPlay="true"**then image will change automatically without clicking any button.

![AjaxControl Toolkit SlideShowExtender Control in ASP.Net](https://www.mindstick.com/mindstickarticle/dd45ecf1-34f7-4157-853e-f8e13808d376/images/c9549c44-8b60-4a32-bd5e-2d5df480f833.png)

---

Original Source: https://www.mindstick.com/articles/281/ajax-toolkit-slideshowextender-control-in-asp-dot-net

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
