Use your MSDN library Trint, under help->Index of VIsual Studio.Net there's
an abundance of information there.
Anyway request.files(0).filename will get you the full CLIENT SIDE filename
of the file. Therefore if the user uploaded the file "c:\my
documents\file.txt" that's what you'll get.
Then you can use the System.IO.Path library to get the file.txt bit by using
System.IO.Path.GetFileName(request.files(0).filename)
So your save as code would now look lik
Request.Files(0).SaveAs(Server.MapPath("/WebApplication1/Uploadfiles/" &
System.IO.Path.GetFileName(request.files(0).filename) ))
By the way if you use
Server.Mappath("/afolder")
You;ll get a path that's relative to your IIS ROOT. so in the above case
you'd get a path c:\inetpub\wwwroot\afolder
But if you use
Server.Mappath("afolder")
It'll be relative to your executing file so you'll get something like
c:\inetpub\wwwroot\webapplication1\afolder
And use the ~ if you want the path to be relative to your app root :-
server.mappath("~\test\afolder")
Will return c:\inetpub\wwwroot\webapplication1\test\afolder
Even if your aspx file is in
c:\inetpub\wwwroot\webapplication1\someotherfolder.