I found a few where they past the item instead of the value. i want the value to be passed. for e.g
<asp:CheckBoxList ID="cblPlanets" runat="server" Width="109px">
<asp:ListItem Value="1">Mercury</asp:ListItem>
<asp:ListItem Value="2">Venus</asp:ListItem>
<asp:ListItem Value="3">Earth</asp:ListItem>
<asp:ListItem Value="4">Mars</asp:ListItem>
<asp:ListItem Value="5">Jupiter</asp:ListItem>
<asp:ListItem Value="6">Saturn</asp:ListItem>
</asp:CheckBoxList>
and i want it to display
You selected:
1
2
3
6
the back end part i did was
Label1.Text = "You Selected:<br /><i>"
For Each li As String In CBInsurance.SelectedValue
If li.ToString = True Then
Label1.Text += li.ToString & "<br />"
End If
Next
Label1.Text += "</i>"
but it only display one value. instead of multiple value