fill dropdown list thru dataset

Discussion in 'ASP .Net Web Controls' started by K R Lal, May 23, 2005.

  1. K R Lal

    K R Lal Guest

    Hi,

    Any idea how to fill a dropdownlist thru dataset

    I done like this
    ddLst1.DataSource = myDataSet
    ddLst1.DataMember = myDataSet.Tables(0).Columns(1).Caption

    ddLst1.DataValueField = myDataSet.Tables(0).Columns(0).Caption

    but it is not working ; my dropdown list showing blanck

    please help me
    --
    Regards

    K R Lal
    K R Lal, May 23, 2005
    #1
    1. Advertising

  2. Already answered in another group. avoid cross-posting.

    you need to call the DataBind() method.

    -Andrew

    "K R Lal" <> wrote in message
    news:...
    > Hi,
    >
    > Any idea how to fill a dropdownlist thru dataset
    >
    > I done like this
    > ddLst1.DataSource = myDataSet
    > ddLst1.DataMember = myDataSet.Tables(0).Columns(1).Caption
    >
    > ddLst1.DataValueField = myDataSet.Tables(0).Columns(0).Caption
    >
    > but it is not working ; my dropdown list showing blanck
    >
    > please help me
    > --
    > Regards
    >
    > K R Lal
    >
    >
    Andrew Robinson, May 23, 2005
    #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. K R Lal

    fill dropdown list thru data set

    K R Lal, May 23, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    9,367
    =?Utf-8?B?c2F0aGk=?=
    May 24, 2005
  2. VB Programmer
    Replies:
    4
    Views:
    2,923
  3. Julia De Silva

    Iterate thru dataset

    Julia De Silva, Aug 21, 2006, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    117
    Julia De Silva
    Aug 21, 2006
  4. THTB
    Replies:
    0
    Views:
    167
  5. Max Williams
    Replies:
    3
    Views:
    149
    Robert Klemme
    Jan 6, 2009
Loading...

Share This Page