File Upload

S

SQL

Hi all,

I'm trying to upload a file from the user to the server. I have set up a
folder on the server, and for testing sake, I've given full control to the
everyone group. My code is as follows (again for testing sake, I've
hardcoded a lot of stuff in): File1 being an input of type = file.

If Not (File1.PostedFile Is Nothing) Then

File1.PostedFile.SaveAs("\\monserv\inetpub\TestKnowledge\Upload\Test.txt")

End If

The code runs without error, but no file is uploaded. Am I missing
something?

Thanks.
 
P

Patrice Scribe

Add a "Else" part to make sure File1 is not nothing. If confirmed my guess
would be you forgot to change the enctype on the "form" tag...
 

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,995
Messages
2,570,236
Members
46,822
Latest member
israfaceZa

Latest Threads

Top