jammer20002
04-30-2005, 03:46 PM
I'm new to ASP... still trying to find my way around.
I have a script that sends an email after the user fills in the fields.
And... it has has a file attachment thing that allows you to attach a file to the email.
I've managed to get this working.
But... I still have a problem...
I want my end users to be able to send an email without having to attach a file.
The code seems to break down when no file is attached.
So... I need the code needed to check if something exists in the file thing on the HTML form.
I have the following code:
For Each File in Upload.Files
filename = returnFileName(File.Path)
I assume I need to check if something exists in the file field before the above is executed?
Any help would be appreciated.
Thanks.
Jam
I have a script that sends an email after the user fills in the fields.
And... it has has a file attachment thing that allows you to attach a file to the email.
I've managed to get this working.
But... I still have a problem...
I want my end users to be able to send an email without having to attach a file.
The code seems to break down when no file is attached.
So... I need the code needed to check if something exists in the file thing on the HTML form.
I have the following code:
For Each File in Upload.Files
filename = returnFileName(File.Path)
I assume I need to check if something exists in the file field before the above is executed?
Any help would be appreciated.
Thanks.
Jam