ASP.NET file upload component in chrome

The file input type does not work in chrome and i think safari

when i try to upload a file only the filename AND NOT THE PATH is passed from the file upload component.

this is an issue because for the code to work it needs to know where the file is.

I am using the simplest method

        <asp:FileUpload ID="File1" runat="server" />

 string fn = System.IO.Path.GetFileName(File1.PostedFile.FileName);
            string SaveLocation = Server.MapPath("") + "\\" + File1.PostedFile.FileName;
                Response.Write("The file has been uploaded." + fn);
            catch (Exception ex)
                Response.Write("Error: " + ex.Message);

which returns the actual filename and not the path

thanks in advance.
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Due to security reasons of client machine, we can't read file path from program.

Anyhow file upload control can save the file in server. No need to know the client machine file path from program. Refer below link for simple explanation of file upload.
That has nothing to do with the file upload component. It is a browser thing. Some browsers pass the complete file path, others don't. Building code that relies on the complete path of an uploaded file, is not going to work in all browsers.
OWASP: Threats Fundamentals

Learn the top ten threats that are present in modern web-application development and how to protect your business from them.

myshipAuthor Commented:
here is my issue.. i need to be able to select files and then use ftp

i am not using the saveas method

so how can i do that?


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.