I\'m not for sure how the ControlCollection of ASP.Net works, so maybe someone can shed some light on this for me.
I recently discovered the magic that is extension
Linq utilized Generic Collections. ControlsCollection implements IEnumerable not IEnumberable
If you notice this will not work
((IEnumerable)page.Controls).Where(...
However, this does
((IEnumerable)page.Controls).Where(...
You can either cast to Generic IEnumerable or access an extension method that does, like so:
page.Controls.OfType().Where(c => c.ID == "Some ID").FirstOrDefault();