Hi all! I'm novice in Umbraco and test OrderBy method for sorting menu items. I create contentType and add properties "mo" with type "TextString" and fill him 1,2,3 etc.
In partial view i'm using next code:
@foreach (var item in Homepage.Children.OrderByDescending("mo"))
// and have next error:
Object must be of type String.
Description: An unhandled exception occurred during
the execution of the current web request. Please review the stack trace
for more information about the error and where it originated in the
code.
Exception Details: System.ArgumentException: Object must be of type String.
What's wrong? Many thanks in advancefor any helpor alink tohow touse this methodand the like.
Strange logic of OrderBy method
Hi all! I'm novice in Umbraco and test OrderBy method for sorting menu items. I create contentType and add properties "mo" with type "TextString" and fill him 1,2,3 etc.
In partial view i'm using next code:
Object must be of type String. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.ArgumentException: Object must be of type String.
What's wrong? Many thanks in advance for any help or a link to how to use this method and the like.
is working on a reply...