get full File path using Fileupload control
-
iam unable to get full File path using Fileupload control i used, string str = Fileupload1.PostedFile.FileName; and also string str = Fileupload1.FileName; etc using this i can only get the filename, Please Help me
Bharani
-
iam unable to get full File path using Fileupload control i used, string str = Fileupload1.PostedFile.FileName; and also string str = Fileupload1.FileName; etc using this i can only get the filename, Please Help me
Bharani
Hi, Here is how you can upload a file using the FileUploader. string sImageToSavePath = @"c:\inetpub\wwwroot\MySample\img\bb.gif"; //Give a path and a file name byte[] ba = FileUpload1.FileBytes; File.WriteAllBytes(sImageToSavePath,ba); Hope this helps Thx, Gayani
-
Hi, Here is how you can upload a file using the FileUploader. string sImageToSavePath = @"c:\inetpub\wwwroot\MySample\img\bb.gif"; //Give a path and a file name byte[] ba = FileUpload1.FileBytes; File.WriteAllBytes(sImageToSavePath,ba); Hope this helps Thx, Gayani
we are giving the path by our self. c:\inetpub\wwwroot\MySample\img\bb.gif but i need the path what the clients will open to upload the file using fileupload control ex: in my system i use to open the file which is at D:\\Bharani\\Folder1\\...file.xml other can open in his own path i need to track that user selected path is it possible.
Bharani
-
we are giving the path by our self. c:\inetpub\wwwroot\MySample\img\bb.gif but i need the path what the clients will open to upload the file using fileupload control ex: in my system i use to open the file which is at D:\\Bharani\\Folder1\\...file.xml other can open in his own path i need to track that user selected path is it possible.
Bharani
You can get the full path using javascript.
document.getElementById('FileUpload1').value
so store it in a hidden field for later use.EVEN THE WORD IMPOSSIBLE SAYS I M POSSIBLE.
-
iam unable to get full File path using Fileupload control i used, string str = Fileupload1.PostedFile.FileName; and also string str = Fileupload1.FileName; etc using this i can only get the filename, Please Help me
Bharani
Hi barani, Try this string fextn = System.IO.Path.GetFullPath(File1.PostedFile.FileName);
Sutheesh Ramachandran Cybernet Software Systems, T Nagar, Chennai 17.
-
You can get the full path using javascript.
document.getElementById('FileUpload1').value
so store it in a hidden field for later use.EVEN THE WORD IMPOSSIBLE SAYS I M POSSIBLE.
Thanks for ur Help i got the full path from hidden filed and using javascript Thanks allot for all.
Bharani