Friday, 15 June 2012

c# - Enabling textbox on button click event -



c# - Enabling textbox on button click event -

how can add together mechanism in downloader case although many threads on deals either php etc , not upto need.

i have browse button @ front end of textbox get's user entered path on local drive prepare location downloading have hardcoded 1 scheme drive.i want textbox button disabled unless user clciks browse button , new path can entered downloading after then.

how can go?

a quick example:

private void browsebutton_click(object sender, eventargs e) { var savefiledialog = new system.windows.forms.savefiledialog(); var selectedpath= savefiledialog.showdialog(); if (selectedpath == system.windows.forms.dialogresult.ok) { _savepath = savefiledialog.filename; textbox1.enabled = true; textbox1.text = _savepath; } }

c# winforms button textbox

No comments:

Post a Comment