Binding custom objects to dropdown

Discussion in 'ASP .Net' started by 3P, Feb 21, 2010.

  1. 3P

    3P Guest

    Hi.

    What's the best way to bind collection of custom objects to dropdown. The
    problem I have is that entity is identified by two columns in database (to
    properties in object) and I would like SelectedValue return both. Was
    thinking about adding another property joining two other only for dropdown
    (dont' like it) or maybe creating anonymous object with that property only
    for binding.

    How do You do it?
     
    3P, Feb 21, 2010
    #1
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?RGVtZXRyaQ==?=

    Binding child objects of a custom collection

    =?Utf-8?B?RGVtZXRyaQ==?=, Aug 31, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    799
    =?Utf-8?B?RGVtZXRyaQ==?=
    Sep 1, 2005
  2. =?Utf-8?B?SmF5YnVmZmV0?=
    Replies:
    9
    Views:
    995
    Phillip Williams
    Feb 21, 2006
  3. vishnu
    Replies:
    1
    Views:
    1,435
    Patrick.O.Ige
    Mar 25, 2006
  4. 7stud
    Replies:
    11
    Views:
    1,062
    Dennis Lee Bieber
    Mar 20, 2007
  5. Bill Anderson

    Custom Component and Custom Textbox binding

    Bill Anderson, Dec 10, 2003, in forum: ASP .Net Building Controls
    Replies:
    1
    Views:
    687
    Bill Anderson
    Dec 15, 2003
  6. Rachel Koktava

    Binding custom objects to datagrid WITHOUT using Collectionbase

    Rachel Koktava, Sep 1, 2003, in forum: ASP .Net Datagrid Control
    Replies:
    2
    Views:
    379
    Rachel Koktava
    Sep 15, 2003
  7. JcFx
    Replies:
    0
    Views:
    538
  8. Holysmoke

    Binding ArrayList of Custom objects to DropDownList

    Holysmoke, Nov 9, 2004, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    286
    Ryan Cromwell
    Nov 9, 2004
Loading...