I want to check values of textboxes inside of a repeater. If all textboxes are empty i want to assign the check value to 0. I tried this implementation but i got this error System.InvalidCastException
int check = 0;
foreach (TextBox tb in searchResultRepeater.Items)
{
if(tb.Text == ""){
check = 0;
}else{
check = 1;
}
}
How can i fix this exception ?