how to choose a directory to upload files into on the server

fguihen

Junior Contributor
Joined
Nov 10, 2003
Messages
248
Location
Eire
imusing this line to save files from my pc to a server:

myFile.PostedFile.SaveAs(Server.MapPath("./.")+strFilePath);

how would i change this to allow me to save the file into a spcified location on the server?
 
well, the way i want it to work is this:
there are 3 different departments in my building.

they all have a little page on the web site.

rather than letting them update it by messing with the html and wrecking it i want to create an asp page where they log on, they can then add /delete/change the content of their page.

the file upload is for them to upload pictures.

i want to be able to load the pics into a different directory , depending on who is logged on ( eg. sales will have their pics stored in a folder called salesPics, purchaces in purchacesPics etc)

i want to know how do i select a particular directory on the server to upload the images into?

hope this is a decent explination
 
what you can do is, when a user logs in, you find out to what department he belongs and then save a folder name in a session variable.
 
Back
Top