I'm having trouble getting the SlideShowExtender working in a ContentPlaceHolder. The extender works fine when I try it on a test page with no Master Page but does not when I use it on a Web Content Form with a Master Page. The code is exactly the same on both my test page and the ContentPlaceHolder page.
My Web Service:Code:1 <asp:ScriptManager ID="ScriptManager1" runat="server"> 2 </asp:ScriptManager> 3 <asp:Image ID="galleryImage" runat="server" /> 4 <cc1:SlideShowExtender ID="SlideShowExtender1" runat="server" 5 TargetControlID="galleryImage" 6 PreviousButtonID="prevButton" 7 NextButtonID="nextButton" 8 SlideShowServicePath="~/SlideService.asmx" 9 SlideShowServiceMethod="GetSlides" 10 ContextKey="advertising/coors"> 11 </cc1:SlideShowExtender> 12 <asp:ImageButton ID="prevButton" runat="server" ImageUrl="~/images/leftarrow.gif" /> 13 <asp:ImageButton ID="nextbutton" runat="server" ImageUrl="~/images/rightarrow.gif" />
Why can I get this to work in a regular old ASPX page, but not inside of a ContentPlaceHolder on a page that uses a Master Page? Thanks.Code:1 <WebMethod()> _ 2 Public Function GetSlides(ByVal contextKey As String) As AjaxControlToolkit.Slide() 3 4 Dim count As Integer = Directory.GetFiles(Server.MapPath("~/images/" & contextKey)).Count 5 Dim slides(count - 1) As AjaxControlToolkit.Slide 6 Dim files() As String = Directory.GetFiles(Server.MapPath("~/images/" & contextKey)) 7 8 For i As Integer = 0 To files.GetUpperBound(0) Step 1 9 slides(i) = New AjaxControlToolkit.Slide() 10 slides(i).ImagePath = "images/" & contextKey & "/" & Path.GetFileName(files(i)) 11 Next i 12 13 Return slides 14 15 End Function
EDIT: I should note that I don't receive any error and stepping through the code everything looks like it is working.


Reply With Quote
No leading "/" to get to the root dir. I'll have to give this a shot when I get home.
