protected void Button1_Click(object sender, EventArgs e) { int count1=0 ; if (Repeater1.Items.Count > 0) { for (int count = 0; count < Repeater1.Items.Count; count++) { RadioButton rd1 = (RadioButton)Repeater1.Items[count].FindControl("RadioButton1"); RadioButton rd2 = (RadioButton)Repeater1.Items[count].FindControl("RadioButton2"); RadioButton rd3 = (RadioButton)Repeater1.Items[count].FindControl("RadioButton3"); RadioButton rd4 = (RadioButton)Repeater1.Items[count].FindControl("RadioButton31"); if (rd1.Checked) { if (rd1 == rd4) { count1++; } else { count1 = count1 + 0; } } if (rd2.Checked) { if (rd2 == rd4) { count1++; } else { count1 = count1 + 0; } } if (rd3.Checked) { if (rd3 == rd4) { count1++; } else { count1 = count1 + 0; } } Label1.Text = Convert.ToString(count1); }
RadioButton
else
string
return
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)