I have a radupload control that I want to act as a simple file upload (much like the old asp file upload worked), so am using it like this:
I need to be able to iterate through the collection of selected files in my code behind (I'm using VB) and remove all selected files.
To give some background on why I need to do this, I am working on a corporate directory application. When an Admin is editing an employee record, they are presented with 3 checkboxes (Add Photo / Delete Photo / Restore Backup). I have my code set up to only allow one checkbox to be selected at a time (much like the functionality of a radio button) and the radupload is only visible when the "Add Photo" checkbox is selected (otherwise, I set visible=false). Now, should the user select "Add Photo" and then select a photo to upload, and then change their mind and select "Restore Backup", the radupload control will not be visible, but will still have a selected value, and the upload will still be processed as normal, but will conflict with the "Restore Backup" option the user selected last. To solve the issue, in my code behind, I need to be able to remove all selected files.
Thanks!
<telerik:RadUpload ID="RadUploadEmployeePhoto" runat="server" |
ControlObjectsVisibility="None" InitialFileInputsCount="1" |
MaxFileInputsCount="1" /> |
I need to be able to iterate through the collection of selected files in my code behind (I'm using VB) and remove all selected files.
To give some background on why I need to do this, I am working on a corporate directory application. When an Admin is editing an employee record, they are presented with 3 checkboxes (Add Photo / Delete Photo / Restore Backup). I have my code set up to only allow one checkbox to be selected at a time (much like the functionality of a radio button) and the radupload is only visible when the "Add Photo" checkbox is selected (otherwise, I set visible=false). Now, should the user select "Add Photo" and then select a photo to upload, and then change their mind and select "Restore Backup", the radupload control will not be visible, but will still have a selected value, and the upload will still be processed as normal, but will conflict with the "Restore Backup" option the user selected last. To solve the issue, in my code behind, I need to be able to remove all selected files.
Thanks!