Click here to Skip to main content
11,579,093 members (70,814 online)
Rate this: bad
Please Sign up or sign in to vote.
See more: ASP.NET
Respected Sir,
I have made application ,In which I have simple image is putting.
But I want to access Image from sql database and show image slideshow.
Code for simple application as follow.

        /*Add a script manager in your page */
        <asp:ScriptManager ID="ScriptManager1" runat="server">
       /*This is the initial image that will be shown to the user*/
             <asp:Image ID="img1" runat="server"
                                   ImageUrl="~/images/aa.jpg" />
       /*Drag and Drop a SlideShowExtender*/
       <cc1:SlideShowExtender ID="SlideShowExtender1" runat="server"
                   Loop="true" >
            /*Description about the image will be shown in this Label*/
     <asp:Label ID="lblDesc" runat="server" Text=""></asp:Label><br />
           /*Previous, Next Button to see the previous, next image and Play and  stop button to start and stop the  slide show */
         <asp:Button ID="btnPrev" runat="server" Text="Previous" />
         <asp:Button ID="btnPlay" runat="server" Text="" />
         <asp:Button ID="btnNext" runat="server" Text="Next" />
The SlideShowExtender uses a page method(GetImagesForSlide).In code behind add the following page method.
    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);
Posted 4-Jan-13 19:31pm
Edited 4-Jan-13 19:52pm
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

try by using ur database and tabale from which u want to display images and also add hhtp haddler to load images ...this same which i have done once on same will help u a it[^]
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

Check this link: Getting images from data base to Ajax ToolKit slide show extender[^]

Hope it helps you about what you want.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Frankie-C 170
1 OriginalGriff 163
2 Afzaal Ahmad Zeeshan 85
3 Richard Deeming 60
4 Suvendu Shekhar Giri 60
0 OriginalGriff 1,003
1 Sergey Alexandrovich Kryukov 750
2 Abhinav S 583
3 F-ES Sitecore 420
4 Dave Kreskowiak 419

Advertise | Privacy | Mobile
Web04 | 2.8.150603.1 | Last Updated 8 Jan 2014
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100