File Upload Validation

W

Webmills

Hi

I have a form containing a

File Upload Control,
Required Field Validator (connected to the file upload control)
RegularExpressionValidator (connected to the file upload control,
validating the file types for upload)
OK button, calling an event

All four belong to the same validation group.

My problem is this...

When I submit the form, all validation works as expected and required.

However, I would like to check for the existance of the file within the
OK event and report back to the user if the file exists, cancelling the
upload.

When this happens, validation seems a bit off. The page is refreshed,
the file upload control emptied (I assume automatically for security
reasons) and RegularExpressionValidator is fired and reports false,
even though the file upload field is blank! The RequiredFieldValidator
does not fire.

Any thoughts would be gratefully received!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top