drop down list

Discussion in 'ASP .Net Web Controls' started by chris, Jun 16, 2004.

  1. chris

    chris Guest

    I've searched postings, etc. need help on dropdownlist. Can you make the item name equal to more than one data field. I.e. in the example below I'd liek to make the viewable text USER_FNAME USER_LNAME. I've tried to add like:
    ddusernames.DataTextField = ( "USER_FNAME" ) & " " & ( "USER_LNAME" )
    and I've tried:
    ddusernames.DataTextField = ( "USER_FNAME" )("USER_LNAME" )

    Suggestions?

    'create user drop-down list
    ddusernames.datasource = userlist
    ddusernames.DataTextField = ( "USER_FNAME" )
    ddusernames.DataValueField = ( "USER_EMAIL" )
    ddusernames.DataBind()

    thanx!
    chris, Jun 16, 2004
    #1
    1. Advertising

  2. no you have to manually loop thru the dataset and concat the results into
    the listitem and add it into the dropdown. would be a good feature though. i
    see more and more people asking for that ability

    --
    Regards,
    Alvin Bruney
    [ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
    Got tidbits? Get it here... http://tinyurl.com/27cok
    "chris" <> wrote in message
    news:...
    > I've searched postings, etc. need help on dropdownlist. Can you make the
    > item name equal to more than one data field. I.e. in the example below I'd
    > liek to make the viewable text USER_FNAME USER_LNAME. I've tried to add
    > like:
    > ddusernames.DataTextField = ( "USER_FNAME" ) & " " & ( "USER_LNAME" )
    > and I've tried:
    > ddusernames.DataTextField = ( "USER_FNAME" )("USER_LNAME" )
    >
    > Suggestions?
    >
    > 'create user drop-down list
    > ddusernames.datasource = userlist
    > ddusernames.DataTextField = ( "USER_FNAME" )
    > ddusernames.DataValueField = ( "USER_EMAIL" )
    > ddusernames.DataBind()
    >
    > thanx!
    Alvin Bruney [MVP], Jun 16, 2004
    #2
    1. Advertising

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. SirPoonga
    Replies:
    2
    Views:
    735
    Ben Strackany
    Jan 7, 2005
  2. weiwei
    Replies:
    0
    Views:
    994
    weiwei
    Jan 5, 2007
  3. msimmons
    Replies:
    0
    Views:
    449
    msimmons
    Jul 16, 2009
  4. Replies:
    5
    Views:
    245
  5. Replies:
    3
    Views:
    270
Loading...

Share This Page