62,041
社区成员
发帖
与我相关
我的任务
分享
foreach (DataListItem item in DataList1.Items)
{
RadioButton Radiobutton1 = (RadioButton)item.FindControl("Radiobutton1");
RadioButton Radiobutton2 = (RadioButton)item.FindControl("Radiobutton2");
RadioButton Radiobutton3 = (RadioButton)item.FindControl("Radiobutton3");
RadioButton Radiobutton4 = (RadioButton)item.FindControl("Radiobutton4");
if (Radiobutton1.Checked)
{
str = "A";
}
if (Radiobutton2.Checked)
{
str = "B";
}
if (Radiobutton3.Checked)
{
str = "C";
}
if (Radiobutton4.Checked)
{
str = "D";
}
if (ds.Tables[0].Rows[flag++]["答案"].ToString().Equals(str))
++mark;
Session["Score"] = mark.ToString();
Response.Redirect("FinalTestScore.aspx");
}