Solved

How do I get File Path from the Fileupload Control?

Posted on 2006-07-08
1
286 Views
Last Modified: 2012-05-05
I am using a Fileupload control on VB.NET ASP.NET web page and wanted to know how to get the file path.  I can get the file name but how do I get the file path?

[        ] Browse

Protected Sub Button3_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button3.Click
        Dim filename_csv As String = FileUpload1.FileNameToString()  ???? I need the full path
       
        Dim sr As New StreamReader(filename_csv)  
0
Comment
Question by:Hojoformo
1 Comment
 
LVL 5

Accepted Solution

by:
nickhoggard earned 500 total points
ID: 17067329
Hi,

Check out FileUpload1.PostedFile.FileName.

Cheers

Nick
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In this Article, I will provide a few tips in problem and solution manner. Opening an ASPX page in Visual studio 2003 is very slow. To make it fast, please do follow below steps:   Open the Solution/Project. Right click the ASPX file to b…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question