4
Shouts

How to sort ASP.NET DropDownList based on DataValueField or DataTextField using LINQ? « Abhijit's World of .NET

posted by abhijitjanaabhijitjana 653 days, 16 hours, 44 minutes ago
Sunday, August 08, 2010 4:39:45 PM GMT

Sorting ASP.NET Dropdown list is very common requirement for any of the web application development. To Implement this features sometimes developers used to iterate through each and every item and create a sorted list of element then reassign the same source to dropdownlist or sort the element at source itself. But this thing can be done easily using LINQ. In this post I am going describe how you can sort a ASP.NET DropDownList based on either of DataTextField or DataValueField using LINQ and list of KeyValuePair elements as DataSource.

category: ASP.NET | clicked: 2 | | source: abhijitjana.net | show counter code
tags: Sort, dropdownlist, how to, Linq, ASP.NET

No comments yet, be the first one to post comment.

To post your comment please login or signup