protected void selectFolderbtn_Click(object sender, EventArgs e) { Thread thdSyncRead = new Thread(new ThreadStart(openfolder)); thdSyncRead.SetApartmentState(ApartmentState.STA); thdSyncRead.Start(); } public void openfolder() { FolderBrowserDialog fbd = new FolderBrowserDialog(); DialogResult result = fbd.ShowDialog(); string selectedfolder = fbd.SelectedPath; txt_extDestLoc.Text = selectedfolder; }
protected void selectFilebtn_Click(object sender, EventArgs e) { Thread thdSyncReadNew = new Thread(new ThreadStart(selectfile)); thdSyncReadNew.SetApartmentState(ApartmentState.STA); thdSyncReadNew.Start(); } public void selectfile() { OpenFileDialog fileD = new OpenFileDialog(); //create object fileD.Filter = "Iso files|*.iso;"; //define filter fileD.ShowDialog(); //show dialog string globalisopath = fileD.FileName; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)