如题
<asp:DropDownList ID="dl_ownername" runat="server" DataSourceID="SqlDataSource2"
                            DataTextField="ownername" DataValueField="ownername">
                            <asp:ListItem Value="%">全部</asp:ListItem>
                        </asp:DropDownList>没有显示手动加的项

解决方案 »

  1.   

    AppendDataBoundItems="True"
    设置这个属性
      

  2.   

    dl_ownername.Items.insert(0,"请选择");
      

  3.   

    当然可以呀,绑定完了,用ddl_XXX.Item.Insert();
      

  4.   

    dl_ownername.Items.insert(0,"全部");
      

  5.   

    DataSet ds=new DataSet();
    ds=SqlHelper.ExecuteDataset("proc_GetName");
    this.DropDownList1.DataSource=ds;
    this.DropDownList1.DataTextField=ds.Tables[0].Columns["Name"].ToString(); this.DropDownList1.DataValueField=ds.Tables[0].Columns["NameID"].ToString();
    this.DropDownList1.DataBind();
    this.DropDownList1.Items.Insert(0,"请选择");
      

  6.   

    this.DropDownList1.Items.Insert(0,"请选择");