Copied to clipboard

Flag this post as spam?

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


  • Peter Cort Larsen 388 posts 922 karma points
    May 30, 2011 @ 21:09
    Peter Cort Larsen
    0

    Linq Query Members

    Hi,

     

    I want to select all members how is a specific type member type, and have a property named 'ShowOnMap' set to true and bind a distinct value to a dropdownlist.

     

     

    I tried this without success, can anyone help?

     

    Dim sel = (From u In umbraco.cms.businesslogic.member.Member.GetAllAsList

     

     

     

    Where u.ContentType.Equals("Distister") And u.getProperty("showOnMap").Equals("1")

     

     

     

    Order By u.getProperty("postnrMember") Ascending

     

     

     

    Select u.getProperty("postnrMember")).Distinct()

     

     

     

     

    With DropDownList1

     

    .DataValueField =

     

    "Postnr"

     

    .DataTextField =

     

    "Postnr"

     

    .DataSource = sel

     

    .DataBind()

     

     

     

    End With

     

    DropDownList1.Items.Insert(0,

     

    New ListItem("Vælg Postnummer...", "-1"))

     

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies