# Clearing a File Selection

## Content



When a user selects a file at run time using the C1FilePicker control, the file name appears in the text area of the control. If you want to clear all the files selected by the **C1FilePicker** and remove the selected file names from the control, you can use the [ClearSelection](/componentone/api/wpf/online-input-net/dotnet-api/C1.WPF.Input/C1.WPF.Input.C1FilePicker.ClearSelection.html) method. In this example, you'll add a button to your application to clear the **C1FilePicker** control.

For example, add a button to your application and in the button's Click event handler add the following code:

```vbnet
C1FilePicker1.ClearSelection().
```

```EXAMPLE
c1FilePicker1.ClearSelection();
```