add string item to datalist asp.net
问题 I am working with DataList in asp.net C#. I want to add strings as an item to datalist. I do this by following code: ArrayList al = new ArrayList(); for (int i = 0; i < 2; i++) { al.Add(i.toString()); } DataList2.DataSource = al; DataList2.DataBind(); But when I run the program I cannot see the numbers 0 and 1. Instead I see following picture as datalist: Where is my numbers? Does someone know any solution? Note that the task is to add to the datalist the array of string. The datalist code is