I everyone,
I want to populate a dropdownlist with an List Array.
I have an list with 2 arrays inside, and i want to put the first array in DataTextField and the second one in DataValueField.
I have this:
List<String>[] listWAraay= new List<String>[2];
listWAraay[0] = new List<String>();
listWAraay[1] = new List<String>();
Then i'm doing this:
ddl.DataSource = listWAraay;
ddl.DataTextField = listWAraay[0].ToString();
ddl.DataValueField = listWAraay[1].ToString();
ddl.DataBind();
Is not supose to work in this way?