Databind drop-down list with & ldquo; Select Select & rdquo; Does not work

advertisements

I am trying to add "please select" item to my drop down list after adding databind but it doesn't seem to work. This is what I am trying,

ddlListMine.Items.Add(new ListItem("Please Please Please Select....", "-1"));
ddlListMine.DataSource = GetSomeChickens();
ddListMine.DataTextField = "ChickenName";
ddListMine.DataValueField= "NumberOfEggsChickenLay";
ddListMine.DataBind();

I also tried moving First line of code to last, but then "Please please..." item comes in end of drop down list.


Insert your item at Oth Index

    ddlListMine.DataSource = GetSomeChickens();
    ddListMine.DataTextField = "ChickenName";
    ddListMine.DataValueField= "NumberOfEggsChickenLay";
    ddListMine.Items.Insert(0, new ListItem("Please Please Please Select....", "0"));
    ddListMine.DataBind();