I'm trying to use the API to iterate over the controls on a page in the order in which they should be displayed. I'm using the following code:
PageManager pManager = PageManager.GetManager();
PageData page = pManager.GetPageDataList().Where(pD => pD.Title == pageName).FirstOrDefault();
foreach (var ctrl in page.Controls)
//Do stuff here
Unfortunately what I'm finding is that there seems to be no reason in the ordering of the control collection. How can I determine what order the controls should appear on the page?