c# - How do I get selected database name from Combo box in a text box when I choose the Path name -


enter image description here

i want database name database selection when select path in database backup... e.g: selected name of database name 'sample' , click browse button , choose path want backup... now, want selected database name sample after location... instance: c:\users\abc\desktop\sample... me selected name of database in text box.

code browse button of backup:

private void btnbrowseba_click(object sender, eventargs e)         {             folderbrowserdialog dlg = new folderbrowserdialog();             if(dlg.showdialog()== dialogresult.ok)             {                 txtlocba.text = dlg.selectedpath;             }         } 

folderbrowserdialog dlg = new folderbrowserdialog(); if(dlg.showdialog()== dialogresult.ok) {     var database = yourdatabasecombobox.selecteditem.tostring();     var extension= "bak";     var databasefilename = string.format("{0}.{1}", database, extension);     txtlocba.text = system.io.path.combine(dlg.selectedpath, databasefilename); } 

Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -