|
-
Jun 13th, 2005, 01:41 AM
#1
Thread Starter
Junior Member
DropDownList.SelectedIndexChanged
I have 2 dropdown lists on one page. A selection from the first list
determines what gets listed in the second list.
but the problem nothing appears in list2.
the following code
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
DropDownList1.Items.Add("a")
DropDownList1.Items.Add("b")
End Sub
Private Sub DropDownList1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DropDownList1.SelectedIndexChanged
DropDownList2.Items.Clear()
Dim a As Integer
a = DropDownList1.SelectedIndex
If a = 0 Then
DropDownList2.Items.Add("selected a")
Else
DropDownList2.Items.Add("selected b")
End If
End Sub
plz help me
thanx
sara
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|