Home
Manage Your Code
Snippet: File picker on Textbox (C#)
Title: File picker on Textbox Language: C#
Description: opens an open file dialog on a textbox control and updates the text inside Views: 1152
Author: stephen binns Date Added: 1/8/2009
Copy Code  
1        private void ChooseFile(TextBox Textbox)
2        {
3            OpenFileDialog fd = new OpenFileDialog();
4            fd.InitialDirectory = Textbox.Text;
5            fd.ShowDialog();
6            Textbox.Text = fd.FileName;
7        }
Usage
ChooseFile(textBox1);