I am trying to bind a List<AreaField>
to a repeater. I have converted the list into an array by using the ToArray()
method and now have a array of AreaField[]
Here's my class hierarchy
public class AreaFields
{
public List<Fields> Fields { set; get; }
}
public class Fields
{
public string Name { set; get; }
public string Value {set; get; }
}
In the aspx, I would like to bind it a repeater (something like this)
DataBinder.Eval(Container.DataItem, "MyAreaFieldName1")
The MyAreaFieldName1 is the value of the Name property in the AreaFieldItem class.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…