我是用DataList里嵌套RadioButtonList完成一个单选题试题,不知道为什么运行的时候试题总是不显示,谁能帮我看下,请问属性事件里是不是也要设置,最后说详细点,是新手 //============页面加载事件,从数据库中提取题目================
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            this.getCom(1);
            this.getCom(2);
        }
    }
 //==================执行与数据库的关联操作=====================
    protected void getCom(int i)
    {        string dd1 = null;
        if (Application["d1"] != null)
        {
            dd1 = Application["d1"].ToString();
        }
       
        SqlConnection con = dataconn.getcon();
        con.Open();
        switch (i)
        {
            //从数据库中选择单选题
            case 1:
                SqlDataAdapter myadapter1 = new SqlDataAdapter("select * "
                    + "from tb_Questions where que_type='单选题'and que_lessonid='"+dd1 
                    +  "'order by id desc", con);
                DataSet myds1 = new DataSet();
                myadapter1.Fill(myds1,"tb_Questions");
                DataList1.DataSource = myds1;
                DataList1.DataBind();
                //生成单选题题号
                for (int t1 = 1; t1 <= DataList1.Items.Count; t1++)
                {
                    Label lblSelect = (Label)DataList1.Items[t1 - 1].FindControl("Label2");
                    lblSelect.Text = t1.ToString() + "、";
                }
                break;
            //从数据库中选择判断题
            case 2:
                SqlDataAdapter myadapter2 = new SqlDataAdapter("select * "
                    + "from tb_Questions where que_type='判断题'and que_lessonid='" + dd1
                    +  "'order by id desc", con);
                DataSet myds2 = new DataSet();
                myadapter2.Fill(myds2, "tb_Questions");
                DataList2.DataSource = myds2;
                DataList2.DataBind();
                //生成判断题题号
                for (int t2 = 1; t2 <= DataList2.Items.Count; t2++)
                {
                    Label lblDSelect = (Label)DataList2.Items[t2 - 1].FindControl("Label24");
                    lblDSelect.Text = t2.ToString() + "、";
                }
                break;