using check box event to enable a button

Posted on 2005-04-13
Last Modified: 2010-04-07
private void CheckBox1_CheckedChanged(object sender, System.EventArgs e)


I want to enable Button1 as soon as check box is checked
however no luck !

I am using C# in
Question by:deersuper
    1 Comment
    LVL 7

    Accepted Solution


    First disable button1 in pageload event, make checkbox's autopostback=true.

    private void Page_Load(object sender, EventArgs e)
     if (!(Page.IsPostBack)) {
       Button1.Enabled = false;

    private void CheckBox1_CheckedChanged(object sender, System.EventArgs e)
     if (CheckBox1.Checked == true) {
       Button1.Enabled = true;
     } else {
       Button1.Enabled = false;

    hope this helps.


    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
    ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    729 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now