Reputation: 239
I have a form that a user uses to upload a CSV file. Right now the user has to type the full file path of the file into a text box. How can I get a browse for file popup to allow the user to navigate to the file instead of having to type the whole path? Is the functionality already present and I just don't know how to use it yet?
Upvotes: 4
Views: 329
Reputation: 3874
you can create your own class with API calls. Here you have the code. Or you can add a reference to Microsoft Office xx Object Library and use the FileDialog class. Here you have an example of usage.
I prefer the first method, because you are not attached to an external library.
Upvotes: 2