Checkbox when checked, disables textbox.

Posted on 2011-10-11
Last Modified: 2012-05-12
I'm looking for the easiest way to do this:

I have a text box and a check box.  

When some one checks the check box, I want the text box to immediately disable and have its text = "";

Alternatively, when the box is unchecked, I want the text box enabled again.

How can I do this without having to jump through a bunch of hoops?

Essentially, I want the checkbox changed event to runat="client" but that does not work.

Question by:hpdvs2
    1 Comment
    LVL 8

    Accepted Solution

    Figured out the answer.  Add AutoPostBack="True" to the tag, so it checks it right away.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Security Threats Are You Missing?

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    In this Article, I will provide a few tips in problem and solution manner. Opening an ASPX page in Visual studio 2003 is very slow. To make it fast, please do follow below steps:   Open the Solution/Project. Right click the ASPX file to b…
    In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

    779 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

    15 Experts available now in Live!

    Get 1:1 Help Now