Yes, I read most of the topics here, but I can’t find an answer that works.
I have three dropdowns. The first is data binding to capture individual experiment names. The user selects, the pages go back, and in the second drop-down menu, individual time points are displayed. I need help here. I need to add an item to the THAT drop-down list whose identifier, DataTextField, DataValueField is TimePt.
It seems simple, but I can't get it to work.
protected void Page_Load(object sender, EventArgs e)
{
if (Page.IsPostBack)
{
TimePt.DataSource = TimePTDD;
TimePt.DataValueField = "TimePt";
TimePt.DataTextField = "TimePt";
TimePt.DataBind();
TimePt.Items.Insert(0, new ListItem("--Select---", "0"));
TimePt.SelectedIndex = 0;
}
}
I am missing something.
Stephen
source
share