Re: Noob question - binding data to list box (system.data.datarowview?)

Discussion in 'ASP .Net' started by David Wier, Apr 17, 2008.

  1. David Wier

    David Wier Guest

    You need to tell it, from the dataset you get returned what to display and
    what to assign to the 'value' of the item
    Like Product for DataTextField and ProductID for DataValueField

    David Wier
    http://aspnet101.com
    http://iWritePro.com - One click PDF, convert .doc/.rtf/.txt to HTML with no
    bloated markup


    "Arch Stanton" <> wrote in message
    news:...
    > I'm trying to bind data in a dataset (obtained from an Access DB) to a
    > listbox in ASP.net. I know my dataset is being created properly because it
    > displays fine in a datagrid, but I can't get it to display in a listbox.
    > Here's what I'm trying:
    >
    > dgrDataGrid.DataSource = dstData.Tables("Manufacturer")
    > lstMake.datasource = dstData.Tables("Manufacturer")
    > Page.DataBind
    >
    > There is only one column in the dataset's table, and the datagrid displays
    > it the way I want. But my listbox just repeats the line
    > "system.data.datarowview" over and over.
    >
    > Any help is, as usual, appreciated.
     
    David Wier, Apr 17, 2008
    #1
    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. karim
    Replies:
    5
    Views:
    2,975
    David Waz...
    Jul 11, 2003
  2. =?Utf-8?B?ZXRyb3BpYw==?=

    'System.Data.DataRowView' does not contain a property ......

    =?Utf-8?B?ZXRyb3BpYw==?=, May 9, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    2,671
    =?Utf-8?B?ZXRyb3BpYw==?=
    May 10, 2004
  3. MS
    Replies:
    0
    Views:
    3,224
  4. Georg Mayer
    Replies:
    2
    Views:
    11,361
    Georg Mayer
    Jun 22, 2004
  5. Lloyd Sheen
    Replies:
    0
    Views:
    502
    Lloyd Sheen
    Apr 17, 2008
Loading...

Share This Page