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 421 posts 1038 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"))

     

Please Sign in or register to post replies

Write your reply to:

Draft