Binding a generic list to a repeater - ASP.NET

前端 未结 4 1901
悲&欢浪女
悲&欢浪女 2020-12-04 19:28

I am trying to bind a List to a repeater. I have converted the list into an array by using the ToArray() method and now have a arr

4条回答
  •  攒了一身酷
    2020-12-04 20:02

    You should use ToList() method. (Don't forget about System.Linq namespace)

    ex.:

    IList models = Builder.CreateListOfSize(10).Build();
    List lstMOdels = models.ToList();
    

提交回复
热议问题