logo

get file path in mozila

Posted by bretto kumar A in Visual Studio .NET

23-Dec-08 04:19 AM


hai

string str = Path.GetFullPath(FileUpload1.PostedFile.FileName);

im using the above code ib my application to get the upload file path.

this code is perfectly work in IE

but it dosen't work in Mozilla

in mozilla it get and display path like

C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\hhvB4.tmp.jpg

this

but my image path is C:\Documents and Settings\acibre.ACIINDIA\Desktop\hhvB4.tmp.jpg

how can it solve this problem

please share ur ideas

 

 

 

Reply Reply Using Power Editor

READ THIS

C_A P replied to bretto kumar A

23-Dec-08 05:03 AM

When you have to pass in a file path to do some processing with the file, try using the following C# code.

string path = Path.Combine(Environment.CurrentDirectory, @"..\..\TestDeserialization.xml");

Where,

The TestDeserialization.xml file is in the Project root directory.

It helps to avoid confusion in file paths.



Reply Reply Using Power Editor


digg facebook google buzz reddit del.icio.us stumble upon twitter

Didn't Find The Answer You Were Looking For?

EggHeadCafe has experts online right now that may know the answer to your question.  We pay them a bonus for answering as many questions as they can.  So, why not help them and yourself by becoming a member (free) and ask them your question right now?
Ask Question In Live Forum










Pete's Resume  |  Robbe's Resume  |  Neado  |  Free Icons  |  Privacy  |   (c) 2010