Imports System
Imports System.Web.UI.WebControls
Public partial Class Posts_GeneralASPNET_DataPresentationControls_1270874
Inherits System.Web.UI.Page
Private ReadOnly Property Items() As ListItemCollection
Get
If Me.Session("Items") Is Nothing Then
Me.Session("Items") = New ListItemCollection()
End If
Return Me.Session("Items") as ListItemCollection
End Get
End Property
Private Sub GetData()
GridView1.DataSource = Me.Items
GridView1.DataBind()
End Sub
Protected Sub ListBox1_SelectedIndexChanged(ByVal sender As Object, ByVal e As EventArgs)
If Not Me.Items.Contains(ListBox1.SelectedItem) Then
Me.Items.Add(ListBox1.SelectedItem)
End If
Me.GetData()
End Sub
End Class
'----------------------------------------------------------------
' Converted from C# to VB .NET using CSharpToVBConverter(1.2).
' Developed by: Kamal Patel (http://www.KamalPatel.net)
'----------------------------------------------------------------