Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • CamT 5 posts 85 karma points
    Oct 29, 2019 @ 12:01
    CamT
    0

    Hi

    I've got what I assume a simple problem not sure what I'm missing.

    Got a Checkbox List that has had a few new items added to it and has been reordered in the back office to list the items alphbetically.

    However on the front end when I dipslay the values selected in that list I can't seem to get them to return in that order.

       if (Model.HasValue("services"))
        {
               foreach(var s in Model.Value<IEnumerable<string>>("services")) {
                 <p>@s</p> 
             }
    
        }
    

    They code above returns the items no problem but adding .orderby("services") just gives me an error any idea's what I'm doing wrong?

    Thanks in advace.

Please Sign in or register to post replies

Write your reply to:

Draft