V24s

"Get Updates : Subscribe to our e-mail newsletter to receive updates........" "Good Luck frnds" Admission 2019 Application Form 2019 Colleges Entrance Exam 2019 Results 2019 Notification 2019 University Educational Jobs 2019 Government Jobs 2019

Search This Blog v24s guys

04 April, 2013

Asp.net- How to Get Full File Path from Fileupload Control in Firefox or IE

Introduction:

Here I will explain how to get full path of uploaded file from fileupload control from client machine in Firefox or IE in asp.net using C#, VB.NET.

Description:


In many forums I saw the question like How to get full path from fileupload control from client machine?

For this question answer is we don’t have chance to get full path of uploaded file from fileupload control because of some security reasons browsers will return only file name instead of full file path from client machine.  

If you want to get full path of uploaded file from fileupload control from client machine we need to save that file in our application folder from that we can get path of that file like as shown below


string filename = Path.GetFileName(fileUpload1.PostedFile.FileName);
fileUpload1.SaveAs(Server.MapPath("Files/"+filename));
string filepath = "Files/"+filename;
If you want see it in complete example check below post


No comments:

Popular Posts

Recent Posts

Google Analytics