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;