New to Telerik UI for ASP.NET AJAX? Start a free 30-day trial

Represents a file item in the FileBrowser control.

Definition

Constructors

Creates an instance of the FileItem class without setting any initial values.

C#
public FileItem()

Creates an instance of the FileItem class.

C#
[SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
public FileItem(string name, string extension, long length, string location, string url, string tag, PathPermissions permissions)
Parameters:namestring

The name of the file item. The value of this property will be displayed in the FileBrowser control.

extensionstring

The file extension of the file item.

lengthlong

The size of the file item in bytes.

locationstring

The virtual path to the file item (needs to be unique). When the value is string.Empty, the location is the parent's full path + the name of the file.

urlstring

The url which will be inserted into the RadEditor content area.

tagstring

The tag of the file item. Used when the virtual path must be different than the url of the item. When the value of this property is set, the FileBrowser control uses it instead of the combined virtual path.

permissionsPathPermissions

The permissions on the file item.

Properties

Gets the file extension of the file item.

C#
public string Extension { get; set; }

Gets the size of the file item in bytes.

C#
public long Length { get; set; }

Gets the virtual path of the parent directory item. When the value is string.Empty, the location is got from the item's parent.

C#
public string Location { get; set; }

Gets the virtual path of the parent directory item. When the value is string.Empty, the location is got from the item's parent.

C#
public override string Path { get; }

Overrides: FileBrowserItem.Path

Gets the url which will be inserted into the RadEditor content area.

C#
public string Url { get; set; }

Methods

Serializes the file item into a javascript array. This method should be overridden only when developing a custom FileBrowser control.

C#
public override void Serialize(StringWriter writer)
Parameters:writerStringWriter

a StringWriter used as a target for the serialization.

Overrides: FileBrowserItem.Serialize(StringWriter)