File upload, please help

Bizkaitarra

Member
Joined
Feb 8, 2007
Messages
6
Programming Experience
1-3
Hi!!

I am trying to updload a file with the control file upload.
My code is this:
VB.NET:
[SIZE=2][COLOR=#0000ff]Me[/COLOR][/SIZE][SIZE=2].FileUpload1.SaveAs(Server.MapPath(rutaDestino))[/SIZE]
I get rutaDestino (destinationPath in english) from a function of the aplication. This path is a relative path:
~/GAPI/Apuntes/filename
When the server converts the path, it returns:

HTML:
c:Documents and SettingsJonEscritorioGAPIApuntes-filename

This path is wrong and I can´t updload the file :(

Somebody could help me? Thanks!
 
If your app was run from "C:\path" that Server.MapPath function call would return "C:\path\GAPI\Apuntes\filename" and not what you posted.
 
Back
Top