If I wanted to find checked check boxes on an ASP.NET page I could use the following Linq.
var checkBoxes = this.Controls
.OfType<CheckBox>()
.TakeWhile<CheckBox>(cb => cb.Checked);
That works fine if the checkboxes are nested in the current control collection, but I'd like to know how to extend the search by drilling down into the control collections of the top-level controls.
The question was asked here:
Finding controls that use a certain interface in ASP.NET
And received non-Linq answers, I already have my own version of a recursive control search on type and ID as extension methods, but just wondered how easy this is to do in Linq?