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

Defines the fluent API for configuring the Kendo UI Upload for ASP.NET MVC events.

Definition

Constructors

Initializes a new instance of the UploadEventBuilder class.

C#
public UploadEventBuilder(IDictionary<string, object> events)
Parameters:eventsIDictionary<string, object>

The Upload event handlers.

Methods

Defines the handler of the Cancel client-side event. Fires when the upload was cancelled while in progress.

C#
public UploadEventBuilder Cancel(Func<object, object> handler)
Parameters:handlerFunc<object, object>

The handler code wrapped in a text tag.

Returns:

UploadEventBuilder

Returns the current instance of UploadEventBuilder .

Example:
C#
@( Html.Kendo().Upload()
.Name("Upload")
.Events(events =&gt; events.Cancel(
@&lt;text&gt;
function(e) {
//event handling code
}
&lt;/text&gt;
))
)

Defines the handler of the Cancel client-side event. Fires when the upload was cancelled while in progress.

C#
public UploadEventBuilder Cancel(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the Cancel event.

Returns:

UploadEventBuilder

Returns the current instance of UploadEventBuilder .

Example:
C#
@( Html.Kendo().Upload()
.Name("Upload")
.Events(events =&gt; events.Cancel("onCancel"))
)

Defines the handler of the Clear client-side event. Fires when the files are cleared by clicking on the Clear button.

C#
public UploadEventBuilder Clear(Func<object, object> handler)
Parameters:handlerFunc<object, object>

The handler code wrapped in a text tag.

Returns:

UploadEventBuilder

Returns the current instance of UploadEventBuilder .

Example:
C#
@( Html.Kendo().Upload()
.Name("Upload")
.Events(events =&gt; events.Clear(
@&lt;text&gt;
function(e) {
//event handling code
}
&lt;/text&gt;
))
)

Defines the handler of the Clear client-side event. Fires when the files are cleared by clicking on the Clear button.

C#
public UploadEventBuilder Clear(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the Clear event.

Returns:

UploadEventBuilder

Returns the current instance of UploadEventBuilder .

Example:
C#
@( Html.Kendo().Upload()
.Name("Upload")
.Events(events =&gt; events.Clear("onClear"))
)

Defines the handler of the Complete client-side event. Fires when all active uploads complete—either successfully or with errors.

C#
public UploadEventBuilder Complete(Func<object, object> handler)
Parameters:handlerFunc<object, object>

The handler code wrapped in a text tag.

Returns:

UploadEventBuilder

Returns the current instance of UploadEventBuilder .

Example:
C#
@( Html.Kendo().Upload()
.Name("Upload")
.Events(events =&gt; events.Complete(
@&lt;text&gt;
function(e) {
//event handling code
}
&lt;/text&gt;
))
)

Defines the handler of the Complete client-side event. Fires when all active uploads complete—either successfully or with errors.

C#
public UploadEventBuilder Complete(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the Complete event.

Returns:

UploadEventBuilder

Returns the current instance of UploadEventBuilder .

Example:
C#
@( Html.Kendo().Upload()
.Name("Upload")
.Events(events =&gt; events.Complete("onComplete"))
)

Defines the handler of the Error client-side event. Fires when an upload or remove operation fails.

C#
public UploadEventBuilder Error(Func<object, object> handler)
Parameters:handlerFunc<object, object>

The handler code wrapped in a text tag.

Returns:

UploadEventBuilder

Returns the current instance of UploadEventBuilder .

Example:
C#
@( Html.Kendo().Upload()
.Name("Upload")
.Events(events =&gt; events.Error(
@&lt;text&gt;
function(e) {
//event handling code
}
&lt;/text&gt;
))
)

Defines the handler of the Error client-side event. Fires when an upload or remove operation fails.

C#
public UploadEventBuilder Error(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the Error event.

Returns:

UploadEventBuilder

Returns the current instance of UploadEventBuilder .

Example:
C#
@( Html.Kendo().Upload()
.Name("Upload")
.Events(events =&gt; events.Error("onError"))
)

Defines the handler of the Pause client-side event. Fires when the files are cleared by clicking the Pause button. The button is visible if chunksize is set.

C#
public UploadEventBuilder Pause(Func<object, object> handler)
Parameters:handlerFunc<object, object>

The handler code wrapped in a text tag.

Returns:

UploadEventBuilder

Returns the current instance of UploadEventBuilder .

Example:
C#
@( Html.Kendo().Upload()
.Name("Upload")
.Events(events =&gt; events.Pause(
@&lt;text&gt;
function(e) {
//event handling code
}
&lt;/text&gt;
))
)

Defines the handler of the Pause client-side event. Fires when the files are cleared by clicking the Pause button. The button is visible if chunksize is set.

C#
public UploadEventBuilder Pause(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the Pause event.

Returns:

UploadEventBuilder

Returns the current instance of UploadEventBuilder .

Example:
C#
@( Html.Kendo().Upload()
.Name("Upload")
.Events(events =&gt; events.Pause("onPause"))
)

Defines the handler of the Progress client-side event. Fires when the data about the progress of the upload is available.

C#
public UploadEventBuilder Progress(Func<object, object> handler)
Parameters:handlerFunc<object, object>

The handler code wrapped in a text tag.

Returns:

UploadEventBuilder

Returns the current instance of UploadEventBuilder .

Example:
C#
@( Html.Kendo().Upload()
.Name("Upload")
.Events(events =&gt; events.Progress(
@&lt;text&gt;
function(e) {
//event handling code
}
&lt;/text&gt;
))
)

Defines the handler of the Progress client-side event. Fires when the data about the progress of the upload is available.

C#
public UploadEventBuilder Progress(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the Progress event.

Returns:

UploadEventBuilder

Returns the current instance of UploadEventBuilder .

Example:
C#
@( Html.Kendo().Upload()
.Name("Upload")
.Events(events =&gt; events.Progress("onProgress"))
)

Defines the handler of the Remove client-side event. Fires when an uploaded file is about to be removed. If the event is canceled, the remove operation is prevented.

C#
public UploadEventBuilder Remove(Func<object, object> handler)
Parameters:handlerFunc<object, object>

The handler code wrapped in a text tag.

Returns:

UploadEventBuilder

Returns the current instance of UploadEventBuilder .

Example:
C#
@( Html.Kendo().Upload()
.Name("Upload")
.Events(events =&gt; events.Remove(
@&lt;text&gt;
function(e) {
//event handling code
}
&lt;/text&gt;
))
)

Defines the handler of the Remove client-side event. Fires when an uploaded file is about to be removed. If the event is canceled, the remove operation is prevented.

C#
public UploadEventBuilder Remove(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the Remove event.

Returns:

UploadEventBuilder

Returns the current instance of UploadEventBuilder .

Example:
C#
@( Html.Kendo().Upload()
.Name("Upload")
.Events(events =&gt; events.Remove("onRemove"))
)

Defines the handler of the Resume client-side event. Fires when the files are resumed through clicking the Resume button. The button is visible if chunksize is set and the file upload is paused.

C#
public UploadEventBuilder Resume(Func<object, object> handler)
Parameters:handlerFunc<object, object>

The handler code wrapped in a text tag.

Returns:

UploadEventBuilder

Returns the current instance of UploadEventBuilder .

Example:
C#
@( Html.Kendo().Upload()
.Name("Upload")
.Events(events =&gt; events.Resume(
@&lt;text&gt;
function(e) {
//event handling code
}
&lt;/text&gt;
))
)

Defines the handler of the Resume client-side event. Fires when the files are resumed through clicking the Resume button. The button is visible if chunksize is set and the file upload is paused.

C#
public UploadEventBuilder Resume(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the Resume event.

Returns:

UploadEventBuilder

Returns the current instance of UploadEventBuilder .

Example:
C#
@( Html.Kendo().Upload()
.Name("Upload")
.Events(events =&gt; events.Resume("onResume"))
)

Defines the handler of the Select client-side event. Fires when a file is selected.

C#
public UploadEventBuilder Select(Func<object, object> handler)
Parameters:handlerFunc<object, object>

The handler code wrapped in a text tag.

Returns:

UploadEventBuilder

Returns the current instance of UploadEventBuilder .

Example:
C#
@( Html.Kendo().Upload()
.Name("Upload")
.Events(events =&gt; events.Select(
@&lt;text&gt;
function(e) {
//event handling code
}
&lt;/text&gt;
))
)

Defines the handler of the Select client-side event. Fires when a file is selected.

C#
public UploadEventBuilder Select(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the Select event.

Returns:

UploadEventBuilder

Returns the current instance of UploadEventBuilder .

Example:
C#
@( Html.Kendo().Upload()
.Name("Upload")
.Events(events =&gt; events.Select("onSelect"))
)

Defines the handler of the Success client-side event. Fires when an upload or remove operation is completed successfully.

C#
public UploadEventBuilder Success(Func<object, object> handler)
Parameters:handlerFunc<object, object>

The handler code wrapped in a text tag.

Returns:

UploadEventBuilder

Returns the current instance of UploadEventBuilder .

Example:
C#
@( Html.Kendo().Upload()
.Name("Upload")
.Events(events =&gt; events.Success(
@&lt;text&gt;
function(e) {
//event handling code
}
&lt;/text&gt;
))
)

Defines the handler of the Success client-side event. Fires when an upload or remove operation is completed successfully.

C#
public UploadEventBuilder Success(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the Success event.

Returns:

UploadEventBuilder

Returns the current instance of UploadEventBuilder .

Example:
C#
@( Html.Kendo().Upload()
.Name("Upload")
.Events(events =&gt; events.Success("onSuccess"))
)

Defines the handler of the Upload client-side event. Fires when one or more files are about to be uploaded. The canceling of the event prevents the upload.

C#
public UploadEventBuilder Upload(Func<object, object> handler)
Parameters:handlerFunc<object, object>

The handler code wrapped in a text tag.

Returns:

UploadEventBuilder

Returns the current instance of UploadEventBuilder .

Example:
C#
@( Html.Kendo().Upload()
.Name("Upload")
.Events(events =&gt; events.Success(
@&lt;text&gt;
function(e) {
//event handling code
}
&lt;/text&gt;
))
)

Defines the handler of the Upload client-side event. Fires when one or more files are about to be uploaded. The canceling of the event prevents the upload.

C#
public UploadEventBuilder Upload(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the Upload event.

Returns:

UploadEventBuilder

Returns the current instance of UploadEventBuilder .

Example:
C#
@( Html.Kendo().Upload()
.Name("Upload")
.Events(events =&gt; events.Upload("onUpload"))
)