This example shows the client-side events supported by Telerik Upload for ASP.NET MVC.

You can attach an event handler using either of these options:

  1. Specifiy the JavaScript event handler name:
    Html.Telerik().Upload()
        .Name("attachments")
        .ClientEvents(events => events
            .OnLoad("onLoad")
        )
            
  2. Declare the event handler inline (WebForms syntax):
    <%= Html.Telerik().Upload()
        .Name("attachments")
        .ClientEvents(events => events
           .OnLoad(() => 
           {
            %>
             function(e) {
                 // Perform required actions here.
             }
            <%
           }
        )
    %>
            
  3. Declare the event handler inline (Razor syntax):
    @(Html.Telerik().Upload()
        .Name("attachments")
        .ClientEvents(events => events
            .OnLoad(
            @<text>
                function(e) {
                    // Perform required actions here.
                }
            </text>)
        )
    )
            

The upload has the following events: