I want to get all items of multiples extensions like xlsx,Docx or more from folder browser dialogue. and save it in a list box.
Thank you in advance!
I want to get all items of multiples extensions like xlsx,Docx or more from folder browser dialogue. and save it in a list box.
Thank you in advance!
To add filter to the SaveFileDialog or OpenFileDialog you can write as the following c# code.
using(SaveFileDiaLog sfd = new SaveFileDialog(){Filter = "Doc|*.doc|Docx|*.docx"})
{
if(sfd.ShowDialog() == DialogResult.OK)
{
string fileName = sfd.FileName;
}
}
You can do the same way for OpenFileDialog
If you want to filter all file you can write
Filter = "All files|*.*"