Pls I need your help in some cases about button in C#. How can I know when a particular button is clicked. I want to use the if condition statement to write the event. So I want it to do something when particular button is clicked. I want to put all the code inside one function or class then I can call it anytime. For example
- private void showPanel()
- {
- if (dashPanelButton.Clicked == true)
- {
- dashPanel.Visible = true;
- }
- else if(studInfoBtn.Clicked == true)
- {
- studInfoPanel.Visible = true;
- }
- else
- {
- homePanel.Visible = true;
- }
-
- }
Note the above code is just an assumption not really a working code. Just using it to explain myself