if i type in textbox 1,3 then checkbox1 and checkbox3 will be disabled not checked !!
The coding i provide below is working but ,...it chekec the cjeckoxes according to the text in textbox i.e (1,3) then checkbox1 and checkbox3 will be checked ..
.. but i want when i type 1,3 in textbox then checkbox1 and checkbox3 will be disabled and remain unchecked .........
can any body update my this code to perform above operation ?
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim separator As Char = ","
Dim allIIDs As New List(Of Int32)
If TextBox1.Text.Length <> 0 Then
For Each strNum As String In TextBox1.Text.Split(separator)<br>
Dim num As Int32
If Int32.TryParse(strNum, num) Then
allIIDs.Add(num)
End If
Next
End If
allIIDs.Sort()
For Each control As Control In Panel1.Controls
If TypeOf control Is CheckBox Then
Dim chk As CheckBox = DirectCast(control, CheckBox)
chk.Enabled = False = allIIDs.BinarySearch(Int32.Parse(chk.Text)) > -1
End If
Next
End Sub