J
JoeG
I'm very new to ASP.Net programing, so I hope I can explain what I want to do.
I used the following code to create anywhere from 1 to 16 radiobuttonlist in
a placeholder, each with two "listitems" added to each. What I want to do is
check to see what item the user picked for each of the radiobuttonlists.
For I=2 to FldCount step 2
If myreader.IsDbNull(i)=False then
Dim myRBList As RadioButtonList = New RadioButtonList()
myRBList.ID = "ID" & i
myrblist.repeatcolumns=2
myrblist.cellpadding=1
myrblist.cellspacing=2
myrblist.enableviewstate=True
myRBList.items.add(myreader.getstring(i))
myrblist.items.add(myreader.getstring(i + 1))
Placeholder1.Controls.Add(myRBList)
end if
next I
dim oControl as control
For Each oControl In Placeholder1.Controls
If TypeOf ocontrol Is radiobuttonlist Then
"Once here how do I get to the collection that contains the
items selected"
End If
Next
If anyone knows of any good websites/articles that can explain controls
collection or show how to iterate thru them, I would appreciate it.
I used the following code to create anywhere from 1 to 16 radiobuttonlist in
a placeholder, each with two "listitems" added to each. What I want to do is
check to see what item the user picked for each of the radiobuttonlists.
For I=2 to FldCount step 2
If myreader.IsDbNull(i)=False then
Dim myRBList As RadioButtonList = New RadioButtonList()
myRBList.ID = "ID" & i
myrblist.repeatcolumns=2
myrblist.cellpadding=1
myrblist.cellspacing=2
myrblist.enableviewstate=True
myRBList.items.add(myreader.getstring(i))
myrblist.items.add(myreader.getstring(i + 1))
Placeholder1.Controls.Add(myRBList)
end if
next I
dim oControl as control
For Each oControl In Placeholder1.Controls
If TypeOf ocontrol Is radiobuttonlist Then
"Once here how do I get to the collection that contains the
items selected"
End If
Next
If anyone knows of any good websites/articles that can explain controls
collection or show how to iterate thru them, I would appreciate it.