0

hi everyone,
In my project i'm working on Fileupload control.when i browse a file with IE7 it gives me a full path path of file but when i'm trying in Firefox and Chrome it does not give me a file path.
some says save it to your server or a drive then look from there .so when i delete that file from server. otherwise it will increase my server memory.
Help how to find Full path of the file or it's alternative.
i had tried.
this code till now

fileUpEx.PostedFile.FileName // it works for IE7 not for other browser
Path.GetFullPath(fileUpEx.PostedFile.FileName)// not works 
Server.MapPath(fileUpEx.PostedFile.FileName)//  not works
3
Contributors
2
Replies
5
Views
5 Years
Discussion Span
Last Post by dickersonka
0
string filepath = Server.MapPath(fileUpEx.FileName); 
                        objProperty.PropertyImage = filepath;  
                        fileUpEx.SaveAs(filepath);
0

You really can't do this from the fileupload control. Based on certan ie permission settings, it won't always work in ie either.
My advice is to use either your own control and load the textbox value on postback, or use a 3rd party control.

You normally don't need, care, and so on....of what the path was on the client side.
You might want to rethink the way you are doing things if you need the client path.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.