Use session to hold data in listbox

Faeri

New member
Joined
Apr 11, 2008
Messages
1
Programming Experience
Beginner
Hi, i have a gridview which, when a row is selected using checkbox, the results are displayed in a listbox. Below is the code for it:
However, i have multiple gridviews across different pages displaying different products. I want my listbox to appear on each page and hold items selected from the various gridviews.
Any help would be much appreciated!

Protected Sub GridView1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs)

End Sub

Protected Sub Button7_Click(ByVal sender As Object, ByVal e As System.EventArgs)
Dim i As Int16
For i = 0 To GridView1.Rows.Count - 1


If CType(GridView1.Rows(i).FindControl("CheckBox2"), CheckBox).Checked() Then

Panel1.Visible = True
ListBox1.Items().Add("" & GridView1.DataKeys(i).Value.ToString & (" " & GridView1.Rows(i).Cells(2).Text) & (" £" & GridView1.Rows(i).Cells(3).Text))

End If


Next
 
Back
Top