asp.net - How to take Button Id When i create buttons using the dynamic Buttons -
i have written code , assigned name , text that.
but want button id when create. how it?
panel1.controls.clear(); string btn_name = textbox1.text; button add_btn = new button(); add_btn.name = btn_name; add_btn.text = btn_name; add_btn.click += new eventhandler(this.btn_method); add_btn.size = new system.drawing.size(100, 25); add_btn.location = new system.drawing.point(10, button_count * 150); add_btn.font = new font("times new roman", 10); add_btn.backcolor = color.silver; add_btn.forecolor = color.black; panel1.controls.add(add_btn); button_count++;
Comments
Post a Comment