.net ajax slideshowextender
Jeg er igang med at lage med .net ajaxtoolkit, nærmere bestemt slideshowextender.Selve slide show kommer op på siden, min webservice levere et array af slides (tilsyneladende) men, jeg kan ikke skifte billede/slide i ui eller sætte det til at køre automatisk... der sker bare ingenting.... kun default billede vises.
Her kommer lige noget kode så der forhåbentligt er nogen der lige kan gennemskue denne...
aspx - snippet...:
<asp:Image ID="RestaurantImage" runat="server" ImageUrl="~/Images/Hotels/hotellet1.jpg" AlternateText="Blue Hills image" />
<br />
<asp:Button runat="Server" ID="BackButton" Text="Prev" BorderColor="#FFAC11" BorderWidth="1" BackColor="white" ForeColor="#284775"
Font-Names="Verdana"/>
<asp:Button runat="Server" ID="PlayButton" Text="Play" BorderColor="#FFAC11" BorderWidth="1" BackColor="white" ForeColor="#284775"
Font-Names="Verdana"/>
<asp:Button runat="Server" ID="ForwardButton" Text="Next" BorderColor="#FFAC11" BorderWidth="1" BackColor="white" ForeColor="#284775"
Font-Names="Verdana"/>
<ajaxToolkit:SlideShowExtender ID="slideshowextend1" runat="server" TargetControlID="RestaurantImage"
SlideShowServiceMethod="GetSlides" SlideShowServicePath="~/Services/GetSlidesService.asmx"
AutoPlay="true" NextButtonID="ForwardButton" PlayButtonText="Play"
StopButtonText="Stop" PreviousButtonID="BackButton" PlayButtonID="PlayButton" Loop="false" />
WEBservice snippet:
using System;
using System.Web;
using System.Collections;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Web.Script.Services;
/// <summary>
/// Summary description for GetSlidesService
/// </summary>
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[ScriptService]
public class GetSlidesService : System.Web.Services.WebService {
public GetSlidesService () {
//Uncomment the following line if using designed components
//InitializeComponent();
}
[WebMethod]
public AjaxControlToolkit.Slide[] GetSlides() {
AjaxControlToolkit.Slide[] sl = new AjaxControlToolkit.Slide[] {
new AjaxControlToolkit.Slide(@"C:\Inetpub\wwwroot\CusineRating\Images\Hotels\hotellet1.jpg", "Blue Hills", "Go Blue"),
new AjaxControlToolkit.Slide(@"C:\Inetpub\wwwroot\CusineRating\Images\Hotels\hotellet2.jpg", "Sunset", "Setting sun"),
new AjaxControlToolkit.Slide(@"C:\Inetpub\wwwroot\CusineRating\Images\Hotels\hotellet3.jpg", "Winter", "Wintery...")};
}
}