Books for asp.net

Thursday, January 10, 2008

etrieve the multiple selected items in a CheckBoxList?

Dim strchklist As String = ""

Dim li As ListItem
For Each li In CheckBoxList1.Items
If li.Selected Then
strchklist += li.Text + " "
End If
Next
If strchklist = "" Then
Response.Write("No item Selected")
Else
Response.Write(("You selected : " + strchklist))
End If