Please rate how useful you found this document: 
Average: 3 (4 votes)

File Methods

The following methods are available in the jQuery and Backbone objects of file controls.

file.clear()

The file.clear() method deletes the file selected/uploaded in a file control. This function only works when the control mode is "Edit" or "Disable". Note that on grids, this helper scope is reduced to clear the control field only at the time of being uploaded.

$("#FileID").clear()

Example:

When the user clicks the button with the ID "ClearFile", the .clear() function will delete the uploaded/selected file in the control.

$("#ClearFile").find("button").click(function () {
    $("#FileID").clear();
});