Table of Contents
LayoutTemplate Property

Gets or sets the AJAXUploader's layout template.

Syntax
 public ITemplate LayoutTemplate { get; set; }
Remarks

The default UI of an AJAXUploader consists of one or more file input elements, a cancel button, a progress information area and an uploaded file list area. You can use LayoutTemplate to change this layout.

The LayoutTemplate can contain any valid HTML or ASP.NET server control as well as several pre-defined placeholders. At runtime, the placeholders will be replaced with the corresponding HTML elements. For example, the following placeholder will be replaced with file input elements at runtime.

ASPX
<asp:PlaceHolder runat="server" id="InputPlaceHolder"></asp:PlaceHolder>
The following table lists all supported place holders:
Place Holder ID Replaced With
InputPlaceHolder File input element(s).
ProgressTextPlaceHolder Progress text. The text format is specified by ProgressTextFormat.
PostedFilesPlaceHolder Posted file list. The format of each item is specified by PostedFileLabelFormat.

In addition to the placeholders, a number of predefined control IDs are also supported. These predefined control IDs trigger a certain predefined action. For example, the following button in LayoutTemplate would automatically become the uploader's Cancel button:

ASPX
<asp:Button runat="server" ID="CancelButton" Text="Cancel Upload" />
The following table lists all predefined control IDs:
Control ID Remark
UploadButton Start upload. Must be a Button, LinkButton or an ImageButton control.
CancelButton Cancel upload. Must be a Button, LinkButton or an ImageButton control.
DeleteButton Delete selected files that have already been uploaded. Must be a Button, LinkButton or an ImageButton control.
ProgressBar The progress bar for the uploader. Must be a ProgressBar control.
See Also