Hello. I'm wondering if I can set up the RadAsyncUpload control to allow the page to be validated for required fields before the user can select files for upload.
Currently it's set up so I'm using the OnClientFileSelected event to try to catch the validation. It fails validation, but the Async upload is still performed. I'd prefer to perform validation when the "SELECT" button is clicked, and prevent opening of the file dialog window altogether.
Is there a way to do this? Thanks.
Currently it's set up so I'm using the OnClientFileSelected event to try to catch the validation. It fails validation, but the Async upload is still performed. I'd prefer to perform validation when the "SELECT" button is clicked, and prevent opening of the file dialog window altogether.
Is there a way to do this? Thanks.
<
telerik:RadAsyncUpload
ID
=
"RadUpload"
ControlObjectsVisibility
=
None
runat
=
"server"
OnClientFilesUploaded
=
"OnClientFilesUploaded"
OnClientFilesSelected
=
"OnClientFilesSelected"
HideFileInput
=
"true"
Skin
=
"Hay"
MultipleFileSelection
=
"Automatic"
AllowedFileExtensions
=
".jpeg,.jpg,.png,.gif"
/>
function OnClientFilesSelected(sender)
{
if ( !Validate() ) return false;
}