c# - how do i call a click event from a string -
here problem.
string btn = "btn7"; //this problem. btnclone.click += this.controles[btn]_click ;
so use string share event other button , string must.
i hope can me.
a more standard way find control id
button b = (button)findcontrol(btn);
you search if don't know id
button oldbutt = this.controls.oftype<button>().(b => b.name == btn).first();
Comments
Post a Comment