Wednesday, March 2, 2011

LinqDataSource with mutlple columns of a Table assigned to DataTextField

I have been working on LinqDataSource lateley. To me, it seem to save me some time and avoids code clutter in code behind. It can take care of all those basic master tables that you would want to populate to a dropdown list, gridview or listview.

One thing that I was looking into today was to bind multiple columns to the DataTextField of DropDownList. Here's how I got it:






Pretty much like writing query in code behind! I like it!

No comments:

There was an error in this gadget