Nota: hago un Response.Write y me imprime los cambios.. ejemplo: FalseFalseTrueTrue... de todos los chekbox
Código:
usando este ejemplo me da error en el guardar.execute (Error de conversión al convertir el valor varchar 'checked' al tipo de datos bit.) Dim alSelectedValues As New ArrayList
For Each item As DataListItem In ListaPermisos.Items
'check the item isn't a header or footer
If item.ItemIndex > -1 Then
Dim cb As CheckBox = item.FindControl("CheckOpc")
Dim value As String = cb.Text
Dim checked As Boolean = cb.Checked
'Response.Write(checked) -- Verifico la impresion en pantalla
Dim conexion As New SqlConnection(ConfigurationManager.ConnectionStrings("conexion").ConnectionString)
Dim sql As String = "UPDATE permisos set opc = 'checked' where nick = 'LuigBren'"
conexion.Open()
Dim guardar As New SqlCommand(sql, conexion)
guardar.ExecuteNonQuery()
End If


