Hello guys,
I have a Check Box list like the follwoing
<asp:CheckBoxList id="ChkList_CoBrand1" runat="server" Width="117px" RepeatDirection="Vertical">
<asp:ListItem Value="Community Info">Community Info</asp:ListItem>
<asp:ListItem Value="Crime">Crime</asp:ListItem>
<asp:ListItem Value="Sal Analyser">Sal Analyser</asp:ListItem>
</asp:CheckBoxList>
My task is pretty simple on page load I retrieve from the database for each corresponding Listitem a bool value depending on the bool value returned (In this example say I will return true,true,false)I will need to check the items on which are true and not check items which are false .
How would i go about doing this???
I tried to use ChkList_CoBrand1.Items[0].Selected = "true/false"
but that doesnot work..
How would i check/uncheck the Listitems in a CheckBoxList ?
Hoping for some help
Ashwin