Search code examples
c#.netvb.netopenfiledialog

C# - Save the last selected file names after closing DialogBox


I have a button which will open a file dialog and choose 2 certificates.
enter image description here After i click the button a windows will be shown from where i choose two certificates.enter image description here

I click Open so i will get this two certs. What i want to do is that after i click Open and click again the Select Certificate button instead the empty filename textbox like this enter image description here I want the last selection to be saved. Is it possible such a thing?


Solution

  • OpenFileDialog has a FileName property
    Just assign it