LINQ the lot

LINQ goes so much further than just SQL and XML.

Something like this is just why I love LINQ, a LINQ query on an ASP.NET ListView controls items.

   1:  Dim items = From lvi In AspNetListViewControl.Items _
   2:              Where CType(lvi.FindControl("DropDownList1"), 
	                DropDownList).SelectedValue = someIntVar _
   3:     Select lvi)

 

Getting a ListViewItem's where the selected value of a DropDownList is set to the value I want.  So simple, yet so powerful.

The observant among you will notice that this is in VB.net, not my native C#!! More on that soon! :)

Technorati Tags: ,

Print | posted on Wednesday, May 28, 2008 5:01 PM

Feedback

No comments posted yet.

Your comment:





 
 

Copyright © Steve Clements

Design by Bartosz Brzezinski

Design by Phil Haack Based On A Design By Bartosz Brzezinski