Skip to main content

Drag and Drop

Users can drag files to ASPxUploadControl to add files to a list of files to be uploaded. The drag and drop functionality is initially disabled (the default setting). To enable it, set the ASPxUploadControl.UploadMode property to Advance and switch the UploadAdvancedModeSettings.EnableDragAndDrop property to true.

ASPxUploadControl_DragAndDrop

You can use the UploadControlStyles.DropZone property to customize the drop zone style settings.

ASPxUploadControl allows you to define external zones (HTML elements) where users can drop a file to add it to the upload control file list. To specify upload control drop zones, list zone IDs in the UploadAdvancedModeSettings.ExternalDropZoneID property. When a file is being dragged over a drop zone, the following events are raised.

  • The DropZoneEnter event fires if the mouse pointer enters a drop zone element when a user drags a file.
  • The DropZoneLeave event fires if the mouse pointer leaves a drop zone element when a user drags a file.

Run Demo: Drag And Drop Functionality