SlideShow控件

功能:
    能够与Image控件创建起关联,轻易实现出一个具备导航与自动播放功能的页面相册。
属性:
    TargetControlID : 要与"相册播放"扩展器创建起关联性,以便通过它来展示相片Image控件ID。
    SlideShowServicePath :提供相片的web服务的位置路径与文件名称。如果使用的是页面方法,则不需要。 
    AutoPlay :是否在页面加载完成之后,自动播放相片。
    ImageDescriptionLabelID :用来显示目前所显示之相片说明的Label控件ID。
    NextButtonID :用来播放下一张相处的按钮控件ID。
    PlayButtonText :播放按钮上的文字。
    StopButtonText :停止播放上的文字。
    PreviousButtonID :用来播放上一张相片的按钮控件ID。
    PlayButtonID :开始与停止播放相片按钮的控件ID。
    Loop :是否允许循环播放。
    PlayInterval :自动播放时,每张相片的间隔时间(单位:毫秒)默认是3000。

代码实例:
    
SlideShow控件<html xmlns="http://www.w3.org/1999/xhtml" >
SlideShow控件
<head id="Head1" runat="server">
SlideShow控件    
<title>SlideShow控件</title>
SlideShow控件    
<link href="style.css" type="text/css" rel="Stylesheet" />
SlideShow控件
</head>
SlideShow控件
<body>
SlideShow控件    
<form id="form1" runat="server">
SlideShow控件        
<div style="text-align: center">
SlideShow控件            
<asp:ScriptManager ID="ScriptManager1" runat="server">
SlideShow控件            
</asp:ScriptManager>
SlideShow控件            
<asp:Image ID="Image1" runat="server" style="border: 5px outset Navy; width: auto;"
SlideShow控件                ImageUrl
="~/Images/Blue Hills.JPG" AlternateText="Blue Hills" />
SlideShow控件            
</>
SlideShow控件            
<asp:Label runat="Server" ID="imageLabel1" Font-Bold="True" ForeColor="Navy" />
SlideShow控件            
<br />
SlideShow控件            
<asp:ImageButton ID="prevButton" runat="server"
SlideShow控件                ImageUrl
="~/Images/Prev.jpg" />
SlideShow控件            
<asp:Button runat="Server" ID="playButton" Text="Play" Font-Size="Larger" />
SlideShow控件            
<asp:ImageButton ID="nextButton" runat="server"
SlideShow控件                ImageUrl
="~/Images/Next.jpg" />
SlideShow控件            
<ajaxToolkit:SlideShowExtender ID="slideshowextend1" runat="server"
SlideShow控件                TargetControlID
="Image1" SlideShowServiceMethod="GetSlides"
SlideShow控件                AutoPlay
="true" ImageDescriptionLabelID="imageLabel1"
SlideShow控件                NextButtonID
="nextButton" PlayButtonText="Play"
SlideShow控件                StopButtonText
="Stop" PreviousButtonID="prevButton"
SlideShow控件                PlayButtonID
="playButton" Loop="true" PlayInterval="5000" />
SlideShow控件        
</div>
SlideShow控件    
</form>
SlideShow控件
</body>
SlideShow控件
</html>

web服务方法或布面方法必须符合下列的签名格式:
SlideShow控件 [System.Web.Services.WebMethod]
SlideShow控件    [System.Web.Script.Services.ScriptMethod]
SlideShow控件SlideShow控件    
public AjaxControlToolkit.Slide[] GetSlides(string contextKey) SlideShow控件
SlideShow控件 }

运行结果:
    SlideShow控件

转载于:https://www.cnblogs.com/abcdwxc/archive/2007/11/13/958141.html