Hi Darrel,
Here's a tip regarding File Upload elements: Validate on the client. Why?
Because the file size may be quite large for all you know, and if you upload
it before validation, the entire file will be uploaded before it is
verified. If it is not verified, the correct file will then have to be
uploaded. This will cause a performance drag on the client (read "slow
things down").
--
HTH,
Kevin Spencer
Microsoft MVP
..Net Developer
What You Seek Is What You Get.
"darrel" <no*****@hotmail.com> wrote in message
news:ed**************@TK2MSFTNGP09.phx.gbl...
I have some INPUT TYPE=FILE fields on a page. There are four of them and
I'd
like to validate them. They can either be empty, or need a certain
filename.
This is what I am doing:
if (fileUpload_instDOC.PostedFile.FileName.length = 0 OR
lcase(right(fileUpload_instDOC.PostedFile.FileName , 3)) = "doc")
I'm checking to see if it is a word document, or empty.
The problem is the empty part. I can't get that to work. It seems to be
ignoring that completely.
-Darrel