Click here to Skip to main content
16,015,697 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i want to enable my button only if one checkbox ix checked.
what will be the code?
Posted

 
Share this answer
 
First you need to set the button 'visiblity' property value to 'false'. Then following code will help you

C#
protected void CheckBox1_CheckedChanged(object sender, EventArgs e)
       {
           if (CheckBox1.Checked)
               Button1.Visible = true;
           else
               Button1.Visible = false;
       }
 
Share this answer
 
v2

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