Link to home
Start Free TrialLog in
Avatar of jjc9809
jjc9809

asked on

Selecting a Vehicle Type from a Drop Down List

Hi Everyone,

I have a web application that I am working on.  I have populated the VehicleType_vch dropdown list with T Sequel code using a select statement when the application runs.

When the user selects a Vehicle type called Boat, I want other drop downs to appear and become visible based on the selection by ther user with the VehicleType_vch Drop Down List.

Where do I place the coding to  handle this event?  Do I place in the Selected IndexChanged event or TextChanged event or some other place?  When I run  the coding below nothing happens, so I have something wrong.

My coding:

Protected Sub DDLVehicleType_vch_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DDLVehicleType_vch.SelectedIndexChanged
        If DDLVehicleType_vch.SelectedItem.ToString = "Boat" Then
            LblBoatState.Visible = True
            DDLState.Visible = True
        End If
    End Sub

jjc9809
Avatar of Member_2_5974504
Member_2_5974504

Set a break point on the IF... and let us know if your code is reaching the "if" statement and than as next if "yes" let us know if the objects can be initialized?

Question is in a protected procedure are the obejcts you asking for are known? Maybe for testing, try it public.

Hope this will help you.
ASKER CERTIFIED SOLUTION
Avatar of Kyle Abrahams, PMP
Kyle Abrahams, PMP
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial