Linq is pretty amazing. I'm working on a feature for Boardroom Web where a person can select multiple items that are in a CheckBoxList. I wanted a quick and easy way to read all of the items they checked. Here's the Linq statement to read everything that is checked:
var selectionResults = from ListItem item in cblAnswers.Itemswhere item.Selected == trueselect item;
I'm not sure if I'm using Linq just to use Linq, but sure seems like a very simple way to get what I needed in this case.
Otto R. Radke is the one of the founders of iTech Northwest, a Microsoft .NET software company specializing in collaboration, communication, and integration applications and services.
ottoradke.com and all content copyright ©
1969-2008 by Otto R. Radke, unless otherwise noted.
This work is licensed under a
Creative Commons Attribution-Share Alike 3.0 United States License.