LightBox for ASP.NET Web Forms
Automatically Playing the LightBox Items
Task-Based Help > Automatically Playing the LightBox Items

If you choose you can automatically play items in the lightbox as a slideshow. When AutoPlay is set to True the C1LightBox will automatically cycle through content items. When ShowTimer is True a progress bar will be displayed with a Play/Pause button to let users start and stop the slideshow at run time.

In the examples below you'll add  autoplaying and a timer to the LightBox.

In Source View

In Source view add AutoPlay="True" ShowTimer="True" to the <cc1:C1LightBox> tag so it appears similar to the following:

<cc1:C1LightBox ID="C1LightBox1" runat="server" AutoPlay="True" ShowTimer="True">

At Design Time

In Design view, select the C1LightBox control and in the Properties window set the following:

In Code

Add the following code to the Page_Load event:

To write code in Visual Basic

Visual Basic
Copy Code
Me.C1LightBox1.AutoPlay = True
Me.C1LightBox1.ShowTimer = True

To write code in C#

C#
Copy Code
this.C1LightBox1.AutoPlay = true;
this.C1LightBox1.ShowTimer = true;
See Also