Skip to main content


Showing posts from April, 2012

Natural Sorting in

In this post,I will show you how to implement natural sorting in are several ways to implement this,but in this post,I am going to use windows api.
Check out following link for more detailsStrCmpLogicalW (shlwapi)
Let's start the implementation

Create a new class named FileList and add following code

Create a new class in App_Code folder and add following code

Here is complete source codeFileList.cs
using System; using System.Collections.Generic; using System.Linq; using System.Web; publicclass FileList { public FileList() { } publicstring Name { get; set; } public DateTime DateModified { get; set; } publicstring FileType { get; set; } publicstatic List<FileList> List { get { returnnew List<FileList> { new FileList{Name="file11.txt",DateModified=DateTime.Now,FileType="Text"}, new FileList{Name="file1.txt",DateModified=DateTime.Now,FileType="Text"}…