I'll introduce my objects first.
Nothing to worry about. If I show you the XML view of the User[], it should looks like below.
Now we can assign this to a GridView.
Code:
GridView1.DataSource = UserList;
GridView1.DataBind();
Design:
Dont forget to import the objects namespaces in the page header in the HTML view.
........
........
Explanation:
I'm using
What we are doing here is to match the Parent object property name Home to access the child object. Actually it is a object of Address type. So that I can cast the object to Address type and access the child property Country.