Click here to Skip to main content
Rate this: bad
good
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.

<div>
        /*Add a script manager in your page */
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
 
       /*This is the initial image that will be shown to the user*/
       <div>
             <asp:Image ID="img1" runat="server"
                                    Height="400px"
                                   Width="400px"
                                   ImageUrl="~/images/aa.jpg" />
       </div>
 
       /*Drag and Drop a SlideShowExtender*/
       <cc1:SlideShowExtender ID="SlideShowExtender1" runat="server"
                                                     BehaviorID="SlideShowBehaviorID"
                                                     TargetControlID="img1"
                                                     SlideShowServiceMethod="GetImagesForSlide"
   AutoPlay="true"
 ImageDescriptionLabelID="lblDesc"
                                                     NextButtonID="btnNext"
                                                     PreviousButtonID="btnPrev"
                                                     PlayButtonID="btnPlay"
  PlayButtonText="Play"
      StopButtonText="Stop"
                   Loop="true" >
       </cc1:SlideShowExtender>
       <div>
            /*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" />
        </div>
 </div>
The SlideShowExtender uses a page method(GetImagesForSlide).In code behind add the following page method.
  [System.Web.Services.WebMethod]
  [System.Web.Script.Services.ScriptMethod]
    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
v2
Rate this: bad
good
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 issue...it will help u a lot...study it
 
http://stackoverflow.com/questions/11788577/how-to-implement-slideshow-extender-in-asp-net-c-sharp-with-database[^]
  Permalink  
Rate this: bad
good
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.
  Permalink  

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

  Print Answers RSS
0 OriginalGriff 210
1 Richard MacCutchan 100
2 kbrandwijk 90
3 ChauhanAjay 80
4 ProgramFOX 80
0 Sergey Alexandrovich Kryukov 9,050
1 OriginalGriff 8,151
2 CPallini 2,613
3 Richard MacCutchan 2,221
4 Abhinav S 1,928


Advertise | Privacy | Mobile
Web02 | 2.8.140827.1 | Last Updated 8 Jan 2014
Copyright © CodeProject, 1999-2014
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