Friday, January 4, 2008

What is the purpose of AppendDataBoundItems for dropdown


AppendDataBoundItems

Definition:

Using this you can append dynamically.

Example

string[] sdss ={ "test", "test1" };
this.myDropDown.AppendDataBoundItems = true;
this.myDropDown.Items.Add(new ListItem("Bitte wählen...", ""));
this.myDropDown.DataSource = sdss;
this.myDropDown.DataBind();

output

Bitte wählen
test
test1