• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 159
  • Last Modified:

Help with code behind in VS 2005

Hi,

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?
0
neoice
Asked:
neoice
1 Solution
 
Bob LearnedCommented:
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.

bob
0
 
neoiceAuthor Commented:
Cheers Bob!

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now