hass said:
Hi
We are trying to get a aspx page to sort members but it treats swedish characters wrongly. How do we get it to sort according to european sort orders?
Thanks
/hass
I'm not very with the DirectorySearcher class, so I'm not sure if you
are expecting the results from the FindAll() method to be already sorted
or not, but in any case you have several options, including:
- sort the strings you get using a SortedList - if you create your
SortedList instance using "new SortedList( null)", then the strings you
add into the sorted list will be compared using the String class'
CompareTo() method which uses the current culture information to perform
the comparison.
So as long as you set the current culture to the user's culture, just
drop the strings you want sorted into the SortedList, and you're there.
See this for more information:
http://msdn.microsoft.com/library/en-us/cpguide/html/cpconsortingdataforspecificculture.asp