I curently have a set up like below
public class ProptsClass
{
public class ClassA
{
public list<ClassB> pcb { get; set; }
}
public class ClassB
{
public list<ClassC> pcc { get; set; }
}
public class ClassC
{
public string _someproperty { get; set; }
}
}
what I want to do is to databind object ClassA to a ListView with one of the columns being databound to ClassC._someproperty .
When I try to databind it as
<%#Eval("Namespace.ProptsClass.ClassA.pcb.pcc._someproperty") %>
I get the error: "DataBinding: Namespace ProptsClass.ClassA + ClassB' does not contain a property with the name '_someproperty'".
Can somebody tell me where I am doing wrong and what is the correct way of doing it. secondly is there a better way I can achieve the same in the code behind instead of ASP.net. Thanks in advance