How to detect click event on a check box using / code behind VB.

Posted on 2005-04-20
Last Modified: 2010-04-17
How to detect click event on a check box using / code behind VB.

I just created one sample login page. What I want to do is when ever

text box for User ID :
text box for Password:
Check box for Windows Authentication

Private Sub chkWinAuthentication_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs)
    txtPassword.Enabled = True
    txtUserName.Enabled = True
End Sub

I dont know why but its not fire the this event.
Question by:punjwani
    LVL 1

    Author Comment

    Sorry my question was incomplete

    I just created one sample login page. What I want to do is when ever  I checked chkWinAuthentication I want to disable to txtPassword and txtUserName.

    I tried to debug its not even go into this procedure "chkWinAuthentication_CheckedChanged", I know there I am doing on txtPassword.Enabled=True but that is only for testing.

    LVL 14

    Accepted Solution

    You need to set the AutoPostBack property of the checkbox to true.


      Nayer Naguib

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Threat Intelligence Starter Resources

    Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

    Suggested Solutions

    Title # Comments Views Activity
    linearIn  challenge 23 54
    Batch file output 20 71
    array220 challenge 8 28
    strCount chalenge 3 33
    Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
    If you’re thinking to yourself “That description sounds a lot like two people doing the work that one could accomplish,” you’re not alone.
    Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

    759 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

    13 Experts available now in Live!

    Get 1:1 Help Now