B
Brian K. Williams
I have a simple CheckBoxList like:
private void setChbSizes(int nProductID)
{
DataSet dsSizes;
dsSizes = dalSportPal.SizesByProductID(nProductID);
if(dsSizes.Tables[0].Rows.Count >= 0)
{
chbSizes.DataSource = dsSizes.Tables[0];
chbSizes.DataTextField = "ItemSize";
chbSizes.DataValueField = "SizeID";
chbSizes.DataBind();
}
}
When I call the following it's always true:
for ( int i=0; i < chbSizes.Items.Count; i++ )
{
if(chbSizes.Items.Selected == false)
{
// Do Something...
}
}
Anyone have a clue as to why my .Selected is always true?
Thanks in advance,
Brian K. Williams
private void setChbSizes(int nProductID)
{
DataSet dsSizes;
dsSizes = dalSportPal.SizesByProductID(nProductID);
if(dsSizes.Tables[0].Rows.Count >= 0)
{
chbSizes.DataSource = dsSizes.Tables[0];
chbSizes.DataTextField = "ItemSize";
chbSizes.DataValueField = "SizeID";
chbSizes.DataBind();
}
}
When I call the following it's always true:
for ( int i=0; i < chbSizes.Items.Count; i++ )
{
if(chbSizes.Items.Selected == false)
{
// Do Something...
}
}
Anyone have a clue as to why my .Selected is always true?
Thanks in advance,
Brian K. Williams