本帖最后由 yksyuan 于 2011-03-16 15:39:44 编辑

解决方案 »

  1.   

    DropDownList   能找到吧?
      

  2.   

     DropDownList   ddl   =   (DropDownList)e.Item.FindControl( "ddl "); 
    这么找对么
      

  3.   


            DataTable table = new DataTable();
            table.Columns.Add("name", typeof(string));
            table.Columns.Add("value", typeof(int));        table.Rows.Add("Ranen", 22);
            table.Rows.Add("Tong", 32);
            table.Rows.Add("Sym", 39);        DropDownList ddlist = new DropDownList();
            ddlist.DataSource = table;
            ddlist.DataTextField = "name";
            ddlist.DataValueField = "value";
            ddlist.DataBind();
            Panel1.Controls.Add(ddlist);
    拿你找到的DropDownList把那个一替换,
      

  4.   

    ddl.Items.Add(new   ListItem(dt.Rows[i][ "nickname "].ToString(),   dt.Rows[i[ "userid "].ToString())); 
    中括号不全,