Quantcast
Channel: ASP.NET AJAX + Ajax Control Toolkit (ACT)
Viewing all articles
Browse latest Browse all 5678

SlideShowExtender on MasterPage

$
0
0

Hello!

I'm very new to AJAX but I wanted to put a slideshowextender on my master page and at the same time load automaticaly the files from a specific folder. 

I got this code on my WebServices:

<WebMethod(true)> _<System.Web.Script.Services.ScriptMethod> _
    Public Function GetSlides() As AjaxControlToolkit.Slide()
        Dim NomeImagens As String() = Nothing
        Dim Caminho As String = ""
        Try
            NomeImagens = System.IO.Directory.GetFiles(HttpContext.Current.Server.MapPath("~") & "Imagens\Parceiros")

            If NomeImagens.Length = 0 Then Return Nothing

            Dim Imagens(NomeImagens.Length - 1) As AjaxControlToolkit.Slide

            For i As Integer = 0 To NomeImagens.Length - 1
                Dim Ficheiro() As String = NomeImagens(i).Split("\")
                Imagens(i) = New AjaxControlToolkit.Slide(HttpContext.Current.Request.Url.GetLeftPart(UriPartial.Authority) & "/Imagens/Parceiros/" & Ficheiro(Ficheiro.Length - 1), Ficheiro(Ficheiro.Length - 1), "")
            Next
            Return Imagens
    End Function

And this code into a Div:

<asp:Image ID="image1" runat="server" Width="100%" Height="100%" /><cc1:SlideShowExtender ID="SlideShowExtender1" runat="server" TargetControlID="image1" ContextKey="~\Imagens\Parceiros\" AutoPlay="true" Loop="true" SlideShowServicePath="~/WebServices/WebServiceImagens.asmx" SlideShowServiceMethod="GetImages"></cc1:SlideShowExtender>

It doesnt work at all. I made a new project but instead of using it on a masterpage a used a WebForms and that worked. Is there something I'm missing to have it working on the master page?


Viewing all articles
Browse latest Browse all 5678

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>