Ajax controltoolkit Learning Log-slideshow (26)

Source: Internet
Author: User
The slideshowextender control is used to extend the image control and provide it with the effect of Slide playback.

Here is an example:

1) Create an ASP. NET Ajax-enabled web project in vs2005 and name it slideshowextender1.

2) drag and drop an image control on the page to display the image. Drag a label below to describe the displayed image. Then, drag and drop three buttons to control the image display.

Generation The Code is as follows: 1 < BR />
2 < ASP: Image ID = "Image1" Runat = "Server" Height = "144px" Width = "202px" Imageurl = "~ /Images/blue hills.jpg"   /> < BR />
3 & Nbsp;   & Nbsp;   & Nbsp;   & Nbsp;   & Nbsp;   & Nbsp;
4 < ASP: Label ID = "Label1" Runat = "Server" Width = "82px" > </ ASP: Label > < BR />
5 & Nbsp;
6 < ASP: button ID = "Button1" Runat = "Server" Text = "Prev"   />
7 < ASP: button ID = "Button2" Runat = "Server"   />
8 < ASP: button ID = "Button3" Runat = "Server" Text = "Next"   /> < BR />
9 < BR />


3) drag and drop a slideshowextender on the page and set its properties.

CodeAs follows: 1 < C0: slideshowextender ID = "Slideshowextender1" Runat = "Server" Imagedescriptionlabelid = "Label1"
2 Loop = "True" Nextbuttonid = "Button3" Playbuttonid = "Button2" Playbuttontext = "Play"
3 Previusbuttonid = "Button1" Stopbuttontext = "Stop" Targetcontrolid = "Image1" Slideshowservicemethod = "Getslides" Autoplay = "True" > </ C0: slideshowextender >
4


Attribute description:

Imagedescriptionlabelid: Label control that describes the displayed image.
Loop: Whether to show images cyclically.
Nextbuttonid: Controls the button for displaying the next image.
Playbuttonid: Controls the button for playing or stopping.
Playbuttontext: The text displayed by the playbuttonid button when the image is displayed.
Previusbuttonid: Controls the button for displaying the previous image.
Stopbuttontext: The text displayed by the playbuttonid button when the image is not displayed.
Targetcontrolid: The target extension control of the control.
Slideshowservicemethod: How to load images during a slide show.

4) press Ctrl + F5 to view the effect in the browser.

As follows;

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.