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

Upload

Class

Definition

Constructors

Initializes a new instance of the Upload class.

C#
public Upload(ViewContext viewContext, IJavaScriptInitializer initializer, IUrlGenerator urlGenerator)
Parameters:viewContextViewContext

The view context.

initializerIJavaScriptInitializer

The javascript initializer.

urlGeneratorIUrlGenerator

The URL Generator.

Properties

Configures the ability to upload a files in an asynchronous manner. Please refer to the async mode help topic for more details.

C#
public UploadAsyncSettings Async { get; }

Gets or sets a value indicating if directories can be selected.

C#
public bool Directory { get; set; }
Property Value:

true allows directory upload.

Gets or sets a value indicating if directories can be dropped.

C#
public bool DirectoryDrop { get; set; }
Property Value:

true allows directory drop.

Initializes a dropzone elements based on a given selector that provides drag and drop file upload.

C#
public string DropZone { get; set; }
Property Value:

The jQuery selector for the DropZone

Gets or sets a value indicating if the component is enabled.

C#
public bool Enabled { get; set; }
Property Value:

true if the component should be enabled, false otherwise; the default is true.

Gets the initially rendered files

C#
public IList<UploadFile> Files { get; }

Gets or sets the Upload messages.

C#
public IUploadMessages Messages { get; }
Property Value:

The Upload messages.

Gets or sets a value indicating if multiple file selection is enabled.

C#
public bool Multiple { get; set; }
Property Value:

true if multiple file selection should be enabled, false otherwise; the default is true.

Gets or sets a value indicating whether to show the list of uploaded files

C#
public bool ShowFileList { get; set; }
Property Value:

true if the list of uploaded files should be visible, false otherwise; true by default

Gets or sets the template for the files

C#
public string Template { get; set; }
Property Value:

The template for the files list

C#
public string TemplateHandler { get; set; }

Gets or sets the template Id for the files

C#
public string TemplateId { get; set; }
Property Value:

The template for the files list

Gets or sets the URL generator.

C#
public IUrlGenerator UrlGenerator { get; }
Property Value:

The URL generator.

Defines the Validation uploading settings

C#
public UploadValidationSettings Validation { get; set; }

Methods

C#
public override IDictionary<string, object> Serialize()
Returns:

IDictionary<string, object>

Overrides: WidgetBase.Serialize()

Implements: IFormEditor.Serialize()

Writes the Upload HTML.

C#
protected override void WriteHtml(HtmlTextWriter writer)
Parameters:writerHtmlTextWriter

The writer object.

Overrides: WidgetBase.WriteHtml(HtmlTextWriter)

Writes the initialization script.

C#
public override void WriteInitializationScript(TextWriter writer)
Parameters:writerTextWriter

The writer object.

Overrides: WidgetBase.WriteInitializationScript(TextWriter)