Click here to Skip to main content
15,887,746 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Hello,
I have a question about buttons in C#. I have a button and when i click on him it does something. After i clicked once the button is automatically deactivated, so i can't click again on him. My question is how can i make the button so i can again on him ?
Posted
Comments
BillWoodruff 9-Nov-13 18:34pm    
If you wrote the code, why are you disabling the Button when you want to click on it again ?
calincoosmin 9-Nov-13 19:05pm    
It was my mistake. I had an if-else statement that was not working properly and thats why my button was always deactivated after i clicked once. I solved now.

1 solution

That's entirely up to your business logic.

Since you already know how to disable a button: MyButton.Enabled = false;, enabling it is just a matter of setting the property to true.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900