File Path question

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello!

I know you can save the file path to SQL from where you took a file from,
like c:/documents.mypictures. And you would use the sFileName =
browsefile.PostedFile.FileName

But if I want to save the file path of the folder I'm saving to like
c:/newpictureplace.
How would I code that?

TIA!

Rudy
 
I know you can save the file path to SQL from where you took a file from,
like c:/documents.mypictures. And you would use the sFileName =
browsefile.PostedFile.FileName

But if I want to save the file path of the folder I'm saving to like
c:/newpictureplace.
How would I code that?

I'm not sure I fully understand what you're asking... Presumably, you're
talking about the HtmlInputFile control here... You're correct that the
PostedFile.FileName property gives you the fully qualified filespec of where
you're uploading the file from (relative to the client's PC, obviously) and,
to save it on the server, you would use the PostedFile.SaveAs method,
specifying a filespec on the server to save the file into...
 
Rudy,

You know you can write
sFileName = "c:\\newpictureplace";
or
sFileName = {whatever server-side code that returns file path};
don't you?

Eliyahu
 
Thank you for your help Mark and Eliyahu. You pointed me in the right
direction!
 

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

Back
Top