get info from datalist

  • Thread starter Thread starter bric
  • Start date Start date
B

bric

I've got a datalist that I'm using to populate a series of multiple
choice questions.

I've got a button under the datalist and onClick I want to process the
list to see which answers were chosen. How do I go about pulling out
the answers?

-
Brian
 
I've got a datalist that I'm using to populate a series of multiple
choice questions.

I should have said, I'm populating a datalist with a series of
multiple choice questions.
 
bric said:
I've got a datalist that I'm using to populate a series of multiple
choice questions.

I've got a button under the datalist and onClick I want to process the
list to see which answers were chosen. How do I go about pulling out
the answers?

Something like this (VB):

Dim Item As DataListItem
For Each Item In DataList1.Items
Dim rbl As RadioButtonList=Item.FindControl("rbl1")
Dim newValue As Integer = rbl.SelectedIndex
' do something with this value
Next Item
 
Something like this (VB):

Dim Item As DataListItem
For Each Item In DataList1.Items
Dim rbl As RadioButtonList=Item.FindControl("rbl1")
Dim newValue As Integer = rbl.SelectedIndex
' do something with this value
Next Item

yes exactly, thanks.
I found something in the asp.net forums that prompted me to remember
datalistitem (I've used datagriditem I don't know how many times so
how come it didn't click?)

thanks again
-
 
Back
Top