Windows c# app - many buttons, one function - how to tell which button was clicked
Posted on 2003-03-09
I have a windows forms app in vs.net / c#. I have 26 buttons - A-Z, rather than have 26 different handlers I would like to have one function then determine which button was pressed (Im going to pass the relevant letter into a stored procedure to a database).
The closest I have got is this:
-that shows me whats in 'sender' - though as well as the text of the button I get:
Is there any way I can easily just get what I require?