How To Use ObjectDataSource With Complex Objects and FormView Control
Posted
by
obautista
on Stack Overflow
See other posts from Stack Overflow
or by obautista
Published on 2010-12-30T03:45:50Z
Indexed on
2010/12/30
3:54 UTC
Read the original article
Hit count: 247
I have a complex object. For example a SCHOOL object that contains a collection of PERSON object. How can I use the ObjectDataSource control with a FormView and flatten the complex object? An example display would be to display the school name and comma separate the students on the page. Is this possible?
I.E.
public string Id
{
get { return m_id; }
set { m_id = value; }
}
public string SchoolName
{
get { return m_schoolName; }
set { m_schoolName = value; }
}
public List(Person> Students
{
get { return m_students; }
set { m_cast = students; }
}
© Stack Overflow or respective owner