Yeah, you're way out... ;)
DataTextField and DataValueField are properties that hold the name of a column / property of the data collection you're bind the control to. So, if you have a DataTable with an Id and a Description column for example, DataTextField would be "Description" and DataValueField would be "Id".
To add items, you can either add them in the markup of the page, or use the Add or the Insert method of the Items collection of the drop-down control. The latter allows you to specify the position of the item in the list.
Code:
MyDropdownList.Items.Add(new ListItem("text", "value"));
MyDropdownList.Items.Insert(4, new ListItem("text", "value"));
HtH,
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
While typing this post, I was listening to:
Peyote Sings by
Tricky (Track 13 from the album:
Angels With Dirty Faces)
What's This?