|
 |
aspx thread: Help with ListBox
Message #1 by "Tom Brzeski" <tom.brzeski@o...> on Thu, 18 Jan 2001 19:26:52 -0000
|
|
Why this code works in aspx page and does not in page using code behind
technique. I am getting variable (item) not defined error.
Public Sub cmdAddAll_Click(ByVal sender As Object, ByVal e As
System.EventArgs)
For Each item In lstBankList.Items
lstBankOut.Items.Add(New ListItem(item.Text, item.Value))
Next
End Sub
Message #2 by "Michael Gaertner" <mgaert@b...> on Thu, 18 Jan 2001 18:11:11 -0500
|
|
Make sure 'item' is declared public or protected. No attribute means
private, and so the page wouldn't see it.
Good luck.
-----Original Message-----
From: Tom Brzeski [mailto:tom.brzeski@o...]
Sent: Thursday, January 18, 2001 2:27 PM
To: ASP+
Subject: [aspx] Help with ListBox
Why this code works in aspx page and does not in page using code behind
technique. I am getting variable (item) not defined error.
Public Sub cmdAddAll_Click(ByVal sender As Object, ByVal e As
System.EventArgs)
For Each item In lstBankList.Items
lstBankOut.Items.Add(New ListItem(item.Text, item.Value))
Next
End Sub
|
|
 |