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

A builder class for UploadFile

Definition

Namespace:Kendo.Mvc.UI.Fluent

Assembly:Kendo.Mvc.dll

Syntax:

C#
public class UploadFileBuilder

Inheritance: objectUploadFileBuilder

Inherited Members object.GetType()object.MemberwiseClone()object.ToString()object.Equals(object)object.Equals(object, object)object.ReferenceEquals(object, object)object.GetHashCode()...

Constructors

C#
public UploadFileBuilder(UploadFile uploadFile)
Parameters:uploadFileUploadFile

Methods

Specifies the extension of the file

C#
public UploadFileBuilder Extension(string extension)
Parameters:extensionstring

The file extension

Returns:

UploadFileBuilder

Example:
C#
@( Html.Kendo().Upload()
.Name("files")
.Files(files => files.Add().Name("file.txt").Size(500).Extension(".txt"))
.Async(a => a
.Save("Save", "Compose")
.Remove("Remove", "Compose")
)
)

Specifies the name of the file

C#
public UploadFileBuilder Name(string name)
Parameters:namestring

The file name

Returns:

UploadFileBuilder

Example:
C#
@( Html.Kendo().Upload()
.Name("files")
.Files(files => files.Add().Name("file.txt").Size(500).Extension(".txt"))
.Async(a => a
.Save("Save", "Compose")
.Remove("Remove", "Compose")
)
)

Specifies the size of the file in bytes

C#
public UploadFileBuilder Size(long size)
Parameters:sizelong

The file size

Returns:

UploadFileBuilder

Example:
C#
@( Html.Kendo().Upload()
.Name("files")
.Files(files => files.Add().Name("file.txt").Size(500).Extension(".txt"))
.Async(a => a
.Save("Save", "Compose")
.Remove("Remove", "Compose")
)
)