hey guy iam working with ajax slide show extender , it work perfect with one album ,
but i have two separte albums , i wrote the code for first album as

    public static AjaxControlToolkit.Slide[] GetSlides()
        AjaxControlToolkit.Slide[] slides = new AjaxControlToolkit.Slide[6];
        slides[0] = new AjaxControlToolkit.Slide("slideshow/basit.jpg", "First image of my album", "First Image");
        slides[1] = new AjaxControlToolkit.Slide("slideshow/aini.jpg", "Second image of my album", "Second Image");
        slides[2] = new AjaxControlToolkit.Slide("slideshow/ateeb.jpg", "Third image of my album", "Third Image");
        slides[3] = new AjaxControlToolkit.Slide("slideshow/shahbaz.jpg", "Fourth image of my album", "Fourth Image");
        slides[4] = new AjaxControlToolkit.Slide("slideshow/rubab.jpg", "Fifth image of my album", "Fifth Image");
        slides[3] = new AjaxControlToolkit.Slide("slideshow/umar.jpg", "Fourth image of my album", "sixth Image");
        return (slides);

 what to do with second album if i change name of GetSlides() then it did't work
2 Years
Discussion Span
Last Post by AleMonteiro

Why don't you define a parameter like albumId on your GetSlides method? Then you can do something like

AjaxControlToolkit.Slide[] slides;

if ( albumId == 1 ) {
     slides = new AjaxControlToolkit.Slide[6];
     // ... fill slides
else {
     slides = new AjaxControlToolkit.Slide[10];
     // ... fill slides

return slides;
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.