Hi again all,
I've once more found a problem I need some helping with!
This time it's how to populate a CheckBoxList from an SQL query
I have gotten as far as to make one plain old HTML checkbox at the time with:
************************CODE FROM ASPX.
VB**************
GBV.SqlCon()
Dim SQ As Data.SqlClient.SqlDataReader
Dim SQLCommand As New System.Data.SqlClient.SqlCommand("set dateformat dmy", GBV.SqlCon)
Dim strmeGroup1, strmeGroup2, strmeGroup3, strmeGroup4, strmeGroup5 As String
Try
SQLCommand.CommandText = ("select meGroup1, meGroup2, meGroup3, meGroup4, meGroup5 from MEMBERS where meMobilnr = '" & strUMobileNR & "'")
SQ = SQLCommand.ExecuteReader()
Do While SQ.Read = True
strmeGroup1 = SQ("meGroup1")
Response.Write("<INPUT type=""checkbox"" id=""cbxGroup1"" value=""" & SQ("meGroup1") & """>" & SQ("meGroup1") & "<br>")
Loop
Catch ex As Exception
Response.Write(ex.Message)
End Try
SQ.Close()
************************************************** *******
But I would need to have the power of asp:CheckBoxList at my will (to manipulate the checked once later in the code)!
Like always... Help is gold to a newbee!
All help is Good help!
Regards
Michael