N
NBercasio
My dropdown and listbox got the same values. If I choose a value in my
dropdown, i want this value to be removed from my listbox.
So far I have this but it is not working...
CODE BEHIND:
Public Sub ddldeptowner_SelectedIndexChanged(ByVal sender As
Object, ByVal e As System.EventArgs) Handles
ddldeptowner.SelectedIndexChanged
Dim LI As ListItem
Dim index As String
index = ddldeptowner.SelectedItem.Value
For Each LI In lstboxadddept.Items
lstboxadddept.Items.Remove(index)
Next
End Sub
WEBFORM:
<asp:dropdownlist Runat="server" ID="ddldeptowner" AutoPostBack=True
OnSelectedIndexChanged="ddldeptowner_SelectedIndexChanged"></asp:dropdownlist>
dropdown, i want this value to be removed from my listbox.
So far I have this but it is not working...
CODE BEHIND:
Public Sub ddldeptowner_SelectedIndexChanged(ByVal sender As
Object, ByVal e As System.EventArgs) Handles
ddldeptowner.SelectedIndexChanged
Dim LI As ListItem
Dim index As String
index = ddldeptowner.SelectedItem.Value
For Each LI In lstboxadddept.Items
lstboxadddept.Items.Remove(index)
Next
End Sub
WEBFORM:
<asp:dropdownlist Runat="server" ID="ddldeptowner" AutoPostBack=True
OnSelectedIndexChanged="ddldeptowner_SelectedIndexChanged"></asp:dropdownlist>