Help with code behind in VS 2005

Posted on 2007-07-20
Last Modified: 2013-11-26

Just started to learn how to create a web site using Visual Studio 2005 pro and have got a query.

I have a placed a Radio button and a Dropdown list box from the 'standard' toolbox on to a page. I have set the 'enabled' property of the list box to false. The idea is that when I click on the radio button it sets the 'enabled' property of the list box to true.
here is the VB code behind:

Partial Class AddConsultation
    Inherits System.Web.UI.Page
    Protected Sub RbStudent_CheckedChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles RbStudent.CheckedChanged
        Cbtutor.Enabled = True
    End Sub
End Class

Now I imagine it is something to do with the 'changed' event. There is no 'clicked' event.

Any ideas what I am doing wrong?
Question by:neoice
    LVL 96

    Accepted Solution

    With web site development, events are usually detected when the page posts back.  In order to get this to happen with the CheckBox, you need to set AutoPostBack = True.


    Author Comment

    Cheers Bob!


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Better Security Awareness With Threat Intelligence

    See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

    A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
    What is Node.js? Node.js is a server side scripting language much like PHP or ASP but is used to implement the complete package of HTTP webserver and application framework. The difference is that Node.js’s execution engine is asynchronous and event…
    This video teaches viewers how to create their own website using cPanel and Wordpress. Tutorial walks users through how to set up their own domain name from tools like Domain Registrar, Hosting Account, and Wordpress. More specifically, the order in…
    Use Wufoo, an online form creation tool, to make powerful forms. Learn how to selectively show certain fields based on user input using rules to gather relevant information and data from your forms. The rules feature provides you with an opportunity…

    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

    14 Experts available now in Live!

    Get 1:1 Help Now