Code:
for(i=0;i<dgemp.Items.Count;i++)
Code:
{
dgitem= dgemp.Items[i];
cb=(dgitem.FindControl("chk1")) as CheckBox;
}
if(cb !=null && cb.Checked )
{
ordList += dgitem.Cells[1].Text + "";
}
and this doesn't crash
Code:
if(cb ==null || !(cb.Checked) ){}
what is your logic?explain its scenario.
_____________
Mehdi.
software student.