Efficient way to fire 2 diff events with the same button on each click?
Posted
by Tomasusa
on Stack Overflow
See other posts from Stack Overflow
or by Tomasusa
Published on 2010-06-09T13:22:48Z
Indexed on
2010/06/09
13:32 UTC
Read the original article
Hit count: 190
I have a C# button, let's say 'ON/OFF':
I want to change 'OFF', when we first click it and run buttonOFF() When we click again, it changes to 'ON' and run buttonON()
and so on..
What's the correct way to do that? Can I do it all in one onClick event? peace of small example would be useful. Thanks !
© Stack Overflow or respective owner