0

Hi
I am new to ASp.net. I don't know how to uses of Slide show extender and images sliding. I am using HTMl Programing .Please suggest me ...
Thanks in Advance.

3
Contributors
7
Replies
9
Views
4 Years
Discussion Span
Last Post by __avd
0

Hi
I mean Image Sliding using buttons. I used Ajax toolkit of SlideShowExtender. There is no result i.e images of slide show is not working .I was insert the the images but automatically or manually sliding are not working...
Thanks For Reply.

0

Take a look at samples at AjaxControlToolki.

If you've code and that is not working then post here so anybody can help you out.

0
<asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
        <div class="Image">
             <asp:Image ID="img1" runat="server"
             Height="358px" Width="400px"
             ImageUrl="~/Images/images (1).jpg"  />
            </div>       
        <ajax:SlideShowExtender ID="SlideShowExtender1" runat="server"
BehaviorID="SSBehaviorID"
            TargetControlID="img1"
            SlideShowServiceMethod="GetSlides"
            AutoPlay="true"
            ImageDescriptionLabelID="lblDesc"
            NextButtonID="btnNext"
            PreviousButtonID="btnPrev"
            PlayButtonID="btnPlay"
            PlayButtonText="Play"
            StopButtonText="Stop"
            Loop="true" >
        </ajax:SlideShowExtender>
        <div style="height: 120px; width: 998px">
            <asp:Label ID="lblDesc" runat="server" Text="" 
                style =" position :absolute; top: 492px; left: 439px;"></asp:Label>
                <br />
            <asp:Button ID="btnPrev" runat="server" Text="Prev" 
                style =" position :absolute; top: 545px; left: 423px;" 
                 />
            <asp:Button ID="btnPlay" runat="server" Text="Play"  
                style =" position :absolute; top: 546px; left: 484px;"/>
            <asp:Button ID="btnNext" runat="server" Text="Next" 
                style =" position :absolute; top: 545px; left: 548px;" 
                 />
0

You need to create a WebService method that returns an array of Slide and add some images under images folder.

<%@ Page Language="C#" %>

<%@ Register
    Assembly="AjaxControlToolkit"
    Namespace="AjaxControlToolkit"
    TagPrefix="ajaxToolkit" %>

<!DOCTYPE html>

<script runat="server">
    [System.Web.Services.WebMethod]
    [System.Web.Script.Services.ScriptMethod]
    public static AjaxControlToolkit.Slide[] GetSlides()
    {
        return new AjaxControlToolkit.Slide[] { 
            new AjaxControlToolkit.Slide("images/a1.jpg", "a1", "Image desc1"),
            new AjaxControlToolkit.Slide("images/a2.jpg", "a2", "Image desc2"),
            new AjaxControlToolkit.Slide("images/a3.jpg", "a3", "Image desc3")
        };
    }
</script>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Sample</title>
</head>
<body>
    <form id="form1" runat="server">
        <div>
            <ajaxToolkit:ToolkitScriptManager ID="ScriptManager1" runat="server" />
            <asp:Label runat="Server" ID="imageTitle" CssClass="slideTitle" /><br />
            <asp:Image ID="Image1" runat="server"
                Height="300"
                Style="border: 1px solid black; width: auto"
                ImageUrl="~/images/a1.jpg"
                />
            <asp:Label runat="server" ID="imageDescription" CssClass="slideDescription"></asp:Label><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"
                TargetControlID="Image1"
                SlideShowServiceMethod="GetSlides"
                AutoPlay="true"
                ImageTitleLabelID="imageTitle"
                ImageDescriptionLabelID="imageDescription"
                NextButtonID="nextButton"
                PlayButtonText="Play"
                StopButtonText="Stop"
                PreviousButtonID="prevButton"
                PlayButtonID="playButton"
                Loop="true" />
        </div>
    </form>
</body>
</html>
0

Thank you for your Reply. It is only working for image displaying, i am asking sliding i.e coding for previous button and next button also .

Thanks in Advance....

0

i am asking sliding i.e coding for previous button and next button also.

The code already been written what we just need to set button controls IDs. Just press/hit the next/prev button.

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.