AJAX Slideshow Extender Control Using C#

by top54u.com 18 Jun, 2008

ASP.Net 2.0 AJAX Slideshow extender is becoming popular these days due to its feature to display the set of images in the form of powerpoint slideshow style. AJAX SlideShow extender takes the ID of image control of ASP.Net 2.0 to display the images in it according to the time interval fixed for it. You can also specify the auto start event to change the images in SlideShow extender when the page loads. Also you can enable the loop to run the SlideShow in continuous manner that loads the first image again after displaying the last image and plays the SlideShow repeatedly.

 

The AJAX SlideShow extender also has features to associate Label and Button controls of ASP.Net 2.0 to display the Image Name, Description and button controls to stop/play or viewing the next and previous image in the slide show. Associated button controls allow the users to stop the automated running Slide show and view the images manually by using next/ previous buttons.

 

Preview

 

AJAX SlideShowExtender Properties

 

TargetControlID: ID of the Image control to display the images of SlideShow program.

 

AutoPlay: Enables the feature to start to SlideShow automatically when page loads.

 

ImageTitleLabelID: ID of the Label control to display the Title/Name of the image.

 

ImageDescriptionLabelID: ID of the Label control to display the Description of the image.

 

NextButtonID: ID of the Button control to view the next image.

 

PlayButtonID: ID of the Button to play the SlideShow. Play Button performs the two functions. When user clicks on play button it plays the slide show and changes the text of the Play Button according to the property of AJAX SlideShow extender StopButtonText. When user again clicks on the PlayButton it stops the SlideShow.

 

PlayButtonText: Text to be displayed on the PlayButton e.g.: Play

 

StopButtonText: Text to be displayed on the PlayButton to stop the SlideShow. By Default PlayButton displays the PlayButtonText when user clicks the PlayButton to view the Slide Show then its Text changes to StopButtonText.

 

PreviousButtonID: ID of the Button to view the previous image.

 

Loop: If Loop is set to true then it plays the SlideShow in repeat/continuous order.

 

SlideShowServiceMethod: Name of the page script web service method to pass the array of Slide Show images.

 

You can use any method name for WebMethod but its return type should be of AjaxControlToolkit.Slide[].

 

Example:

[System.Web.Services.WebMethod]

[System.Web.Script.Services.ScriptMethod]

public static AjaxControlToolkit.Slide[] GetSlides()

 

You must use [System.Web.Script.Services.ScriptMethod] to allow the SlideShowExtender to access the WebMethod.

 

AJAX SlideShowExtender Sample Code

 

<cc1:SlideShowExtender ID="SlideShowExtender1"

AutoPlay="true"

ImageTitleLabelID="lblTitle"

ImageDescriptionLabelID="lblImageDescription"

Loop="true"

NextButtonID="Btn_Next"

PlayButtonID="Btn_Play"

PlayButtonText="Play"

PreviousButtonID="Btn_Previous"

SlideShowServiceMethod="GetSlides"

StopButtonText="Stop"

TargetControlID="imgSlides"

runat="server">

</cc1:SlideShowExtender>

 

Download C# sample code for AJAX SlideShowExtender Control here…

ajax slideshow extender.zip (595.85 kb)

Spotlight.....

Currently rated 5.0 by 2 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , , , , , ,

Comments

8/30/2008 5:45:38 AM

shraddha

I liked ur article very much. but I don't know from where to get Ajax slide show extender control. If u can I'll be greatly obliged to u
thanks
shraddha

shraddha in

Add comment


(Will show your Gravatar icon)  

  Country flag

[b][/b] - [i][/i] - [u][/u]- [quote][/quote]



Live preview

10/11/2008 3:20:33 AM




related videos.....
recent posts.....
top54u ezines.....