Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • David Loosley 13 posts 33 karma points
    Feb 21, 2012 @ 19:19
    David Loosley
    0

    Slideshow Extender not working in Template

    I'm trying to get the AJAX Control Toolkit SlideShowExtender to work in a template and I have spent far too long on this :0(

    I have created a simple template with the SlideShowExtender control, created a page based on this template but no images appear.

    SlideShow.Master:

    <%@ Master Language="C#" MasterPageFile="~/umbraco/masterpages/default.master" AutoEventWireup="true" %>

    <asp:Content ContentPlaceHolderID="ContentPlaceHolderDefault" runat="server">

    <html>
    <head>
        <title>SlideShowExtender Example</title>
        <script type="text/javascript" src="/scripts/slideshow.js"></script>
    </head>
    <body>
        <form id="form1" runat="server">
        <ajaxToolkit:ToolkitScriptManager ID="ScriptManager1" runat="server" />

                      <asp:Image ID="imgBanner" runat="server"
                            Height="175" Width="800"
                            Style="height:175;width:800px; margin-top: 0px;"
                            AlternateText="Skyline" />

                    <ajaxToolkit:SlideShowExtender ID="SlideShowExtender1" runat="server" 
                                BehaviorID="SSBehaviorID"
                                TargetControlID="imgBanner"
                                SlideShowServicePath="\SlideService.asmx"
                                SlideShowServiceMethod="GetSlides"
                                AutoPlay="true" 
                                Loop="true"
                                PlayInterval="15000" />

    </form>
    </body>
    </html>
    </asp:Content>

    The Web Service "SlideService,asmx" function GetSlides works and the images exists.

    With my limited knowledge of everything <g> it looks like the Javascript generated by the AJAX object is making a reference to ContentPlaceHolderDefault_imgBanner and not imgBanner

    <script type="text/javascript">

    //<![CDATA[

    (function() {var fn = function() {$get("ContentPlaceHolderDefault_ScriptManager1_HiddenField").value = '';Sys.Application.remove_init(fn);};Sys.Application.add_init(fn);})();Sys.Application.add_init(function() {

        $create(Sys.Extended.UI.SlideShowBehavior, {"autoPlay":true,"id":"SSBehaviorID","loop":true,"playInterval":15000,"slideShowServiceMethod":"GetSlides","slideShowServicePath":"\\SlideService.asmx"}, null, null, $get("ContentPlaceHolderDefault_imgBanner"));

    });

    //]]>

    </script>

     

     

    Can anyone help with my problem?

    Regards

    David

  • David Loosley 13 posts 33 karma points
    Feb 27, 2012 @ 19:10
    David Loosley
    0

    Would still love to know why the SlideShowExtender does not work.

    Now using jQuery Cycle plugin

Please Sign in or register to post replies

Write your reply to:

Draft