I have a feeling that this article might be helpful to you:

http://www.codeproject.com/KB/aspnet/fileupload.aspx

On Feb 8, 11:48 am, Cerebrus <[email protected]> wrote:
> I've read this whole thread and I fail to understand how you "lose the
> path to the file". Assuming you are using the FileUpload.SaveAs method
> to save the file, you would be defining a path for the file to be
> saved to. That path should be the location where the file is uploaded.
> How can you *lose* that path ?
>
> Perhaps, we need to see (the relevant portion of) your code.
>
> On Feb 7, 6:52 am, Pete <[email protected]> wrote:
>
>
>
> > Hi,
>
> > I am relatively new to ASP.NET and I'm having a little trouble
> > understanding how to accomplish something.  In my ASP.NET Website on
> > one of the Webforms I have a File Upload Control which allows the user
> > to upload a file (either .pdf or .doc file) to a Web Server. I want to
> > store the byte array of the file in an SQL Server Database.  When I
> > upload the file from the local hard drive (say C:\Stuff.doc) to the
> > web server I lose the path to the file because it's relative to the
> > web server.  I need the original filename or it's equivalent to create
> > the filestream in the code-behind on the web server.  Can someone tell
> > me how to do this or what I need to do here?  Your help is much
> > appreciated.
>
> > Thanks so much,
>
> > Pete- Hide quoted text -
>
> - Show quoted text -

Reply via email to