<p>On a file path field, I want to capture the directory path like:</p>

<pre><code>textbox1.Text = directory path
</code></pre>

<p>Anyone?</p>

There is a FolderBrowserDialog class that you can use if you want the user to select a folder.
http://msdn.microsoft.com/en-us/library/system.windows.forms.folderbrowserdialog.aspx
```
```
DialogResult result = folderBrowserDialog1.ShowDialog();
if (result.Equals(get_DialogResult().OK)) {
    textbox1.Text = folderBrowserDialog1.get_SelectedPath();
}
```
```
If all you want is to get the direcotory from a full path, you can do this:
```
```
textbox1.Text = Path.GetDirectoryName(@"c:\windows\temp\myfile.txt");
```
```
This will set the Text-property to "c:\windows\temp\"