Click here to Skip to main content
15,897,891 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi Sir,
I am using SlideShow extender by previous and next button click.the code is like this

XML
<form id="form1" runat="server">
    <br />
    <div>
        <cc1:ToolKitScriptManager ID="ScriptManager1" runat="server">
        </cc1:ToolKitScriptManager>
        <asp:Image runat="server" ID="image1" Height="100" />
        <asp:Button runat="Server" ID="prevButton1" Text="Previous" />
        <asp:Button runat="Server" ID="nextButton1" Text="Next" />
        <cc1:SlideShowExtender runat="Server" ID="slideShowExtender1"   
                TargetControlID="image1" NextButtonID="nextButton1"  
                PreviousButtonID="prevButton1" SlideShowServiceMethod="GetSlides" 
                Loop="true" onprerender="slideShowExtender1_PreRender"/>
    </div><br />
    <div>
        <asp:Image runat="server" ID="image2" Height="150" />
        <asp:Button runat="Server" ID="prevButton2" Text="Previous" />
        <asp:Button runat="Server" ID="nextButton2" Text="Next" />
        <cc1:SlideShowExtender runat="Server" ID="slideShowExtender2" 
                TargetControlID="image2" NextButtonID="nextButton2" 
                PreviousButtonID="prevButton2" SlideShowServiceMethod="GetSlidesWithContext"  
                BehaviorID="SlideShow" ContextKey="Context..." />
   </div>
</form>


and on Defaul.aspx.cs
C#
[System.Web.Services.WebMethod]
[System.Web.Script.Services.ScriptMethod]
public static AjaxControlToolkit.Slide[] GetSlides()
{
   AjaxControlToolkit.Slide[] imgSlide = new AjaxControlToolkit.Slide[3];
   imgSlide[0] = new AjaxControlToolkit.Slide("images/0.jpg", "Autumn", "Autumn Leaves");
   imgSlide[1] = new AjaxControlToolkit.Slide("images/039.jpg", "Creek", "Creek");
   imgSlide[2] = new AjaxControlToolkit.Slide("images/33917_173677092645736_173560562657389_657877_5955296_n.jpg", "Landscape", "Landscape");
   return (imgSlide);
}


now i want that this slideshow work automatically without using button click as page load.
Thanks.
Posted
Updated 24-Apr-11 19:05pm
v2
Comments
Tarakeshwar Reddy 25-Apr-11 1:01am    
Unchecked ignore html

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900