APS.NET 3.0 Slide Show

Posted on 2007-10-10
Last Modified: 2013-11-26
I am developing a web application using MS ASP.NET 2.0.  How do I use the System.Web..UI.WebControls.Image control to randomly display gif files?  What I am looking for is to have the page appear and the image will automatically change every second or so without refreshing the page.  Please provide and example using Visual Basic 2005 & ASP.NET 2.0.

Thanks in advance.
Question by:rgturner
    LVL 16

    Expert Comment

    Use the ASP.NET AJAX SlideShow Extender

    This video demonstrates how the SlideShow extender from the ASP.NET AJAX Control Toolkit turns the standard ASP.NET Image control in to a fully-functional slide show. We also see how an ASP.NET Web service can return not only text and XML data but complete AJAX objects to be consumed by the ASP.NET AJAX Web application. Joe also comments on the benefits of storing images in the file system rather than the database.
    LVL 16

    Accepted Solution

    LVL 16

    Expert Comment

    Example Code for the aspx Page

                <asp:Image ID="Image1" runat="server"
                    Style="border: 1px solid black;width:auto"
                    ImageUrl="~/SlideShow/images/Blue hills.jpg"
                    AlternateText="Blue Hills image" />
                <asp:Label runat="Server" ID="imageLabel1"/><br /><br />
                <asp:Button runat="Server" ID="prevButton" Text="Prev" Font-Size="Larger" />
                <asp:Button runat="Server" ID="playButton" Text="Play" Font-Size="Larger" />
                <asp:Button runat="Server" ID="nextButton" Text="Next" Font-Size="Larger" />
                <ajaxToolkit:SlideShowExtender ID="slideshowextend1" runat="server"
                    Loop="true" />

    Example Code for Code Behind Webservice method

            public static AjaxControlToolkit.Slide[] GetSlides()
                return new AjaxControlToolkit.Slide[] {
                new AjaxControlToolkit.Slide("images/Blue hills.jpg", "Blue Hills", "Go Blue"),
                new AjaxControlToolkit.Slide("images/Sunset.jpg", "Sunset", "Setting sun"),
                new AjaxControlToolkit.Slide("images/Winter.jpg", "Winter", "Wintery..."),
                new AjaxControlToolkit.Slide("images/Water lilies.jpg", "Water lillies", "Lillies in the water"),
                new AjaxControlToolkit.Slide("images/VerticalPicture.jpg", "Sedona", "Portrait style picture")};
    LVL 16

    Expert Comment

    default refresh is every 3 seconds however you can configure this using the PlayInterval property
    LVL 16

    Expert Comment

    If soved please close, otherwise can I help further?

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
    A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
    Need more eyes on your posted question? Go ahead and follow the quick steps in this video to learn how to Request Attention to your question. *Log into your Experts Exchange account *Find the question you want to Request Attention for *Go to the e…
    In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor ( If you're interested in additional methods for monitoring bandwidt…

    732 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now