June 2007 - Posts

28
Comments

LINQ - The Uber FindControl by findleyd

With a simple extension method to ControlCollection to flatten the control tree you can use LINQ to query the control tree: public static class PageExtensions { public static IEnumerable<Control> All( this ControlCollection controls) { foreach ...
13
Comments

A Quick Fix for the Validator SetFocusOnError Bug by findleyd

The ASP.NET validators have this nice property called "SetFocusOnError" that is supposed to set the focus to the first control that failed validation. This all works great until your validator control is inside a naming container. I ran into this recently...
Filed under: ,
More Posts