mr relaxo Posted September 9, 2003 Posted September 9, 2003 hi, I'm working on a clothing website and what im trying to do is have a listbox of sizes for each colour an item has. I create the listboxes dynamically based on the number of colours which works fine but I dont know how to access them when I try to add their selected items to the order. Could someone explain how I can access those controls and find each item that has been selected? I've pasted the code for creating the controls below. Thank you Dim lbxdynamicsizes As ListBox For i = 0 To chkcolours.Items.Count - 1 lbxdynamicsizes = New ListBox() lbxdynamicsizes.ID = "lbxsize" & i lbxdynamicsizes.SelectionMode = ListSelectionMode.Multiple lbxdynamicsizes.Rows = 2 lbxdynamicsizes.DataSource = ds.Tables(1) lbxdynamicsizes.DataTextField = "sizes" panelsizes.Controls.Add(lbxdynamicsizes) Dim spacer As LiteralControl = New LiteralControl("<br>") panelsizes.Controls.Add(spacer) Quote You can not get ye flask.
Moderators Robby Posted September 10, 2003 Moderators Posted September 10, 2003 Inside the loop, add an event handler for those controls. Then add a method/function to handle the event. And I would place this line outside the loop... Dim spacer As LiteralControl = New LiteralControl("<br>") Quote Visit...Bassic Software
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.