The answer I'm looking for could be simple, I'm pretty much a beginner in this. Problem is, I barely know the methods and parameters of the RadioButtonList class at all. So perhaps I should be using some other method? If so, please tell me.
Here's the situation: I have a stripped down default.aspx page. Aside from a element, almost ALL the functionality has to be in the code-behind in aspx.vb.
The program retreives information from a database, the number of which may vary, it compares this to another list of tables the number of which can also vary.
So I need to "bind" a dynamic number of RadioButtonLists to the asp:table element controls, and I need to create a dynamic number of ListItems to each RadioButtonList created. Later, I need to be able to access the selected value of each in order to decide future functions in the database.
An example of the code is like this:
In .aspx:
<asp:table ID="table1" runat="server">
In .aspx.vb (code-behind)
Sub createHtmlTables()
For i = 0 To productIndex.Count - 1
''//create a RadioButtonList for each i
Dim row As New TableRow
Dim cell As New TableCell
For k = 0 To productTypeAmountIndex.Count - 1
''//create a ListItem(radiobutton)
''//for each k and include it in the RadioButtonList
''//assign a value (for example name) of the product as
''//the ListItems ID to retreive it later
Next
''//add the RadioButtonList to cell.controls etc
Table1.Rows.Add(row)
Next
End Sub
Sub addToDb()
For i = 0 To productIndex.Count - 1
''//get the RadioButtonList for each i
''//and return the value of the selected radiobutton
''//within the list to a variable
Next
End Sub
Sorry if this is long and confusing, but as I can't even form my questions right yet, I tried to include as much information as possible. Basically I just need an example of how and which methods to use to get all that working. Thank you.