i am working on an assignment in which i have to fetch the data from ms access and fill the appropriate controls according to data.....i am facing a problem in checkbox....when i compare the single value with checkbox its working......but when i try to check multiple check boxes nothing happen...
here is the code ##(am using asp.net using vb)##
If hobbies.Equals("cricket swimming tennis") Then
CheckBox1.Checked = True
CheckBox2.Checked = True
CheckBox3.Checked = True
ElseIf hobbies.Equals("cricket") Then
CheckBox1.Checked = True
ElseIf hobbies.Equals("swimming") Then
CheckBox2.Checked = True
ElseIf hobbies.Equals("tennis") Then
CheckBox3.Checked = True
End If
the first 'if' condition is not working ....'elseif' conditions are working
Aucun commentaire:
Enregistrer un commentaire