how to show multiple fields in a listbox?

Discussion in 'ASP .Net Building Controls' started by Arvid, Mar 13, 2007.

  1. Arvid

    Arvid Guest

    I have a listbox that is filled with data from a database, but only one field
    Is it possible to show more fields in a listbox?


    Arvid, Mar 13, 2007
    1. Advertisements

  2. Yes, set the Rows property to determine the number of rows/items to show in
    the list.
    Mark Fitzpatrick, Mar 14, 2007
    1. Advertisements

  3. Arvid

    Arvid Guest

    I have multiple rows, but just one item per row. I would like to see in one
    row/record a name and a address and ... But I have to choose one of them.

    Can I show all?
    Arvid, Mar 16, 2007
  4. Arvid

    Riki Guest

    Use SQL to combine the fields that you want:
    SELECT field1 + '-' + field2 AS myField FROM myTable;
    Riki, Mar 18, 2007
  5. Arvid

    Arvid Guest

    I changed my view like you said (but oracle syntax ) , it seems to be a quick
    and easy way to solve my problem

    thank you
    Arvid, Mar 19, 2007
    1. Advertisements

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.