public Control FindControlRecursive(Control container, string name) { if (container.ID == name) return container; foreach (Control ctrl in container.Controls) { Control foundCtrl = FindControlRecursive(ctrl, name); if (foundCtrl != null) return foundCtrl; } return null; }
foreach (var result in results) { TextBox tot = (TextBox)FindControlRecursive(Page, "Total" + i); TextBox obtd = (TextBox)FindControlRecursive(Page, "Obtd" + i); TextBox pre = (TextBox)FindControlRecursive(Page, "Pre" + i); extBox grade = (TextBox)FindControlRecursive(Page, "Grade" + i); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)