Today we see how easy the ASP.Net Ajax SlideShow Control is.
The Ajax Slide Show control is the same as in PowerPoint. The image changes after some time automatically, so now we start step wise methods.
Step 1. First you have to add a Scriptmanager
Step 2. Add a Lable and an Image control and three buttons for next, prev, stop and such.
Step 3. Now add a Slideshow Extender Control and go to the source and add some properties for the Slideshow like:
<asp:SlideShowExtender ID="SlideShowExtender1" runat="server" AutoPlay="true"
ImageDescriptionLabelID="lbldatails" TargetControlID="Image1" Loop="true" StopButtonText="Stop"
PlayButtonText="Play" NextButtonID="buttonNext" PreviousButtonID="buttonPrev"
PlayButtonID="buttonPlay" SlideShowServiceMethod="GetSlides" UseContextKey="True"></asp:SlideShowExtender>
Now go to the Image Control's smart tag and select Add Slideshow page method and write the following code:
[System.Web.Services.WebMethodAttribute(), System.Web.Script.Services.ScriptMethodAttribute()]
public static AjaxControlToolkit.Slide[] GetSlides()
{
AjaxControlToolkit.Slide[] slides = new AjaxControlToolkit.Slide[4];
slides[0] = new AjaxControlToolkit.Slide("images/a.jpg", "ered", "nice images");
slides[1] = new AjaxControlToolkit.Slide("images/b.jpg", "dss", "nice images");
slides[2] = new AjaxControlToolkit.Slide("images/c.jpg", "d", "nice images");
slides[3] = new AjaxControlToolkit.Slide("images/d.jpg", "ds", "nice images");
//return default(AjaxControlToolkit.Slide[]);
//return default(AjaxControlToolkit.Slide[]);
return slides;
}
Join the conversation! Your thoughts help the community grow.
Sign in to leave a comment
It is the same account you read, post and publish with — and you will come straight back to this page.

sunil kumarPosted Aug 6, 2013, 4:31 AM
Thanks dude... It really works
Rick WarnerPosted Feb 23, 2012, 11:12 AM
Hi, Error Message is "Content controls have to be top-level controls in a content page or a nested master page that references a master page." Thank you
heba salehPosted May 19, 2011, 10:13 AM
im trying to use this , but it keeps telling me "unknown sevrer tag asp:SlideShowExtender" who to solve this?
Ankit NandekarPosted Apr 11, 2011, 5:29 AM
nice work dinkar