Aug 4, 2010 at 4:57 PM

I have set up a form with a few field such as name and email address and the file upload control. Is there a way to perform validation on the fields before the file upload is started? I need to make sure at the very least that the email address is not blank and would like to validate it is a valid email format using regex.

Aug 4, 2010 at 5:53 PM
The UploadStarted event fires just prior to files being uploaded, but it does not give a mechanism to cancel the upload if e.g. custom validation fails. You could implement such a feature in FileUploaderControl if desired. An alternative would be to make your web page into a 2-step process: step 1, fill out this form with your email and name; when user presses "next", validate the form. If all is well, go to step 2: upload files via the file uploader control.