Home > Asp.net > Alphanumeric Sort Using PadNumbers

Alphanumeric Sort Using PadNumbers

This post was most recently updated on August 11th, 2019

Problem Statement: Sort the Alphanumeric values
Solution :
below is the Code that helped to sort the alphanumeric values
Example :
you have the list
var List = {a1,ba3,aa2,a2,ba2,aa3};

we can not sort this directly using

so to sort this we need to PadNumbers to value and then sort the List.
with the help of below code 

we can pad the number to the string

Code
Model:

View:

 

 

This Article is TAGGED in , , . BOOKMARK THE permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">