private void SetAnswer()
{
StrQuery = "SELECT AnswerID,Answer FROM TBL_Answer where QuestionID='" + QID + "'";
oDt = ClsConnection.ExecuteSelectQry(StrQuery);
for (int i = 0;i< oDt.Rows.Count; i++)
{
//if (oDt.Rows.Count > 0)
{
Label lbl = new Label();
LblAnswer.Text = oDt.Rows[i]["Answer"].ToString();
chckbox.Visible = true;
}
}
}
我使用一个标签和一个复选框,但它显示单个标签和复选框,但标签和复选框应根据问题的选项动态生成。