Hi.
Currently both items will be checked.
What method i can use instead of IndexOf?
<asp:CheckBoxList ID="CBL_gender" runat="server">
<asp:ListItem>women</asp:ListItem>
<asp:ListItem>men</asp:ListItem>
</asp:CheckBoxList>
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Page.IsPostBack = False Then
Dim gender As String = "women"
For Each item As ListItem In Me.CBL_gender.Items
If gender.ToString.IndexOf(item.Value) >= 0 Then
item.Selected = True
End If
Next
End If
End Sub