S
Sparky Arbuckle
The code below works to an extent. The problem with it is that no
matter which item is selected, the first one in the list is always the
item that gets added/removed. How can I alleviate this problem? I have
tried If Not Page.IsPostBack and still nothing.
Private Sub btnCol1ToCol2_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles btnCol1ToCol2.Click
Dim s As String = lbColumn1.SelectedItem.Text()
lbColumn1.Items.Add(s)
lbColumn2.Items.Remove(s)
lblDisplay.Text = "Deleted: <b>" & lbColumn1.SelectedItem.Text & "</b>"
End Sub
matter which item is selected, the first one in the list is always the
item that gets added/removed. How can I alleviate this problem? I have
tried If Not Page.IsPostBack and still nothing.
Private Sub btnCol1ToCol2_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles btnCol1ToCol2.Click
Dim s As String = lbColumn1.SelectedItem.Text()
lbColumn1.Items.Add(s)
lbColumn2.Items.Remove(s)
lblDisplay.Text = "Deleted: <b>" & lbColumn1.SelectedItem.Text & "</b>"
End Sub