在ItemDataBound中写如下代码:
Dim itemType As ListItemType = e.Item.ItemType
If itemType = ListItemType.Footer Then
    dim ddl as DropDownList=e.item.findcontrol("...")
    ....       
End If

解决方案 »

  1.   

    在ItemDataBound中写如下代码:
    Dim itemType As ListItemType = e.Item.ItemType
    If itemType = ListItemType.Footer Then
        dim ddl as DropDownList=e.item.findcontrol("...")
        ....       
    End If
      

  2.   

    用楼上的方法绑定,绑定数据后:
    DropDownList1.CleanSelection();
    DropDownList1.Items.Insert(0,"---All---");
      

  3.   

    Add the ALL like this:ListItem allitem = new ListItem();
    allitem.Text = "ALL";
    allitem.Value = "";
    DropDownList1.Items.Add(allitem);绑定数据can in PreRender(object sender, System.EventArgs e) too
      

  4.   

    郁闷,早自己解决了,但是这个项目却破产了。。说是客户不感兴趣!!!!我们是利用Dotnetnuke portal做的一个项目资源管理,做了一半说不做了!靠!结贴吧!