IN THE NAME OF GOD
HELLO TO ALL
i wanna build a program that when it run, in one form equal rows in a DB , build button and with every button clicked, run program that addressed in programaddress column.
i build buttons and assign to a array of button.
i cant know which button is clicked.
can anyone help me?
THANKFUL.
GOODBYE.
rastinrastini 0
Newbie Poster
Recommended Answers
Jump to Postthe sender object keeps track of what object invoked the event. So just cast the sender to a button object.
Button B = (Button)sender;
then get what ever information from the button that you need.
exampleB.Text//returns text on button B.Name//returns name of button
All 3 Replies
Diamonddrake 397
Master Poster
ddanbe 2,724
Professional Procrastinator Featured Poster
rastinrastini 0
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.