Solved

How do I get File Path from the Fileupload Control?

Posted on 2006-07-08
1
283 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
Comment Utility
Hi,

Check out FileUpload1.PostedFile.FileName.

Cheers

Nick
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

One of the pain points with developing AJAX, JavaScript, JQuery, and other client-side behaviors is that JavaScript doesn’t allow for cross domain request for pulling content. For example, JavaScript code on www.johnchapman.name could not pull conte…
In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

772 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now