I am having some difficulty getting a checkboxlist control to determine
which checkboxes are checked. Here is a code sample from the event that
should read it:
private void btnFilter_Click(object sender, System.EventArgs e)
{
ArrayList arr=new ArrayList();
for(int i=0;i<ckFilter.Items.Count;i++)
{
if(ckFilter.Items[i].Selected)
{
arr.Add(ckFilter.Items[i].Text);
}
}
IEnumerator en=arr.GetEnumerator();
while(en.MoveNext())
{
Response.Write(en.Current+"<br>");
}
}
The only problem is that ckFilter.Items[i].Selected always returns false
regardless of whether the box is checked. I am sure this is a simple
problemAny ideas?
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!