I am trying to use the Infragistics ASP.Net WebUpload control for uploading files onto server.
Now: If the user uploads files, they can't cancel the operation. The control don't work properly and they should refresh the page to reset the control state.
My requirement: The user should be able to cancel the upload operation.
I need a single button to reset the control and clean-up the uploaded files on the server side or the client side.
Register Assembly="Infragistics4.Web.v12.2, Version=12.2.20122.1007, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb" Namespace="Infragistics.Web.UI" TagPrefix="ig"
Register Assembly="Infragistics4.Web.jQuery.v12.2, Version=12.2.20122.1007, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb" Namespace="Infragistics.Web.UI.EditorControls" TagPrefix="ig"
<ig:WebUpload ID="wuFile" runat="server" ProgressUrl="/IGUploadStatusHandler.ashx"
MaxSimultaneousFilesUploads="1" Mode="Multiple">
</ig:WebUpload>
<div id="error-message" style="color: #FF0000; font-weight: bold;">
This is the WebUpload control in aspx.
We are using Infragistics ASP.Net Web v12.2
The WebUpload has, out of the box, Cancel button, that appears, when you start uploading the file. You can see this if you try to upload a bigger file. If you use that button "Cancel", the file will not uploaded to the server. Once the file is uploaded, to a "fileUploadPath" directory configured in the Web.config file, the control is not responsible for it. If you want to delete some files, then you need custom code to access the directory and delete them.
If you want to filter the uploaded files, before they are finally saved, then you can use the server-side events of the control. This is not especially for you case, but it can be used to delete files, because of some criteria, just before they are saved in a directory.