Hello
I am trying to get the SlideShowExtender to work in my ASP.NET AJAX application...however, I can get the slideshow to work with a normal aspx page...BUT not when in the contentplaceholder...which comes from the Masterpage.master
Here is my current code in a .aspx page (which is the content page derived from master page)
Code:
<%@PageTitle=""Language="VB"MasterPageFile="~/mywebsite.master"AutoEventWireup="false"CodeFile="slideshow.aspx.vb"Inherits="slideshow" %>
<%@RegisterAssembly="AjaxControlToolkit"Namespace="AjaxControlToolkit"TagPrefix="cc1" %>
<asp:ContentID="Content1"ContentPlaceHolderID="contentholder"Runat="Server">
<asp:ScriptManagerID="ScriptManager1"runat="server">
</asp:ScriptManager>
<asp:ImageID="img1"runat="server"Height="400px"Width="400px"ImageUrl="~/images/Blue Hills.jpg"/>
<cc1:SlideShowExtenderID="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">
</cc1:SlideShowExtender>
<asp:LabelID="lblDesc"runat="server"Text=""></asp:Label><br/>
<asp:ButtonID="btnPrev"runat="server"Text="Previous"/>
<asp:ButtonID="btnPlay"runat="server"Text=""/>
<asp:ButtonID="btnNext"runat="server"Text="Next"/>
</asp:Content>
and the code for its codebehind file is:
Code:
PartialClass slideshow
Inherits System.Web.UI.Page
<System.Web.Services.WebMethod(), System.Web.Script.Services.ScriptMethod()> _
PublicSharedFunction GetSlides() As AjaxControlToolkit.Slide()
Dim imgSlide(3) As AjaxControlToolkit.Slide
imgSlide(0) = New AjaxControlToolkit.Slide("images/Blue hills.jpg", "Blue Hills", "Blue Hills")
imgSlide(1) = New AjaxControlToolkit.Slide("images/Sunset.jpg", "Sunset", "Sunset")
imgSlide(2) = New AjaxControlToolkit.Slide("images/Waterlilies.jpg", "Water Lilies", "Water Lilies")
imgSlide(3) = New AjaxControlToolkit.Slide("images/Winter.jpg", "Winter", "Winter")
Return imgSlide
EndFunction
EndClass
I cant get it to work at all under the contentplaceholder......but it works in a plain old .aspx file....
any help will be much appreciated.
Thanks
~Namu
|