Ajax Control Problem

Discussion in 'ASP.NET / ASP.NET Core' started by darryl, Jul 24, 2009.

  1. I am trying to get the slideshowextender to work on my site. I went through the video for this control and it still is not working, I will display the first image but it will not display any others. I have created a webservice and added code to my website. I have provide the code below and if anyone could help me with this or have any ideas please email me at [email protected]

    here is my webservice code:

    Imports System.Web
    Imports System.Web.Services
    Imports System.Web.Services.Protocols
    ' To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line.
    ' <System.Web.Script.Services.ScriptService()> _
    <WebService(Namespace:="http://tempuri.org/")> _
    <WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1)> _
    <Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
    <System.Web.Script.Services.ScriptService()> _
    PublicClass SlidesService
    Inherits System.Web.Services.WebService
    <WebMethod()> _
    PublicFunction GetSlides() As AjaxControlToolkit.Slide()
    Dim myslides(5) As AjaxControlToolkit.Slide
    myslides(0) = New AjaxControlToolkit.Slide("Images/SlideShow/slide1.jpg", "", "")
    myslides(1) = New AjaxControlToolkit.Slide("Images/SlideShow/slide2.jpg", "", "")
    myslides(2) = New AjaxControlToolkit.Slide("Images/SlideShow/slide3.jpg", "", "")
    myslides(3) = New AjaxControlToolkit.Slide("Images/SlideShow/slide4.jpg", "", "")
    myslides(4) = New AjaxControlToolkit.Slide("Images/SlideShow/slide5.jpg", "", "")
    myslides(5) = New AjaxControlToolkit.Slide("Images/SlideShow/slide6.jpg", "", "")

    Return myslides
    EndFunction
    End
    Class

    Here is my Webpage code


    <asp:ImageID="Image1"
    runat="server"
    Height="250"
    Width="250"
    ImageUrl="Images/SlideShow/slide1.jpg"
    AlternateText="Slide Show Images"/>
    <cc1:SlideShowExtenderID="SlideShowExtender1"
    runat="server"
    TargetControlID="Image1"
    SlideShowServicePath="SlidesService.asmx"
    SlideShowServiceMethod="GetSlides"
    AutoPlay="true"
    PlayInterval="2"
    Loop="true"/>
     
  2. Hi,
    In the SlideShowExtender where you set a value to that function.
    SlideShowServiceMethod="GetSlides"
    That part should be wrapped as <Animations><OnLoad><Sequence></Sequence></OnLoad></Animations>
    All the best,
    Mark
     

Share This Page