fill dropdown list thru data set

K

K R Lal

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
 
G

Guest

Hi

Just now i tried...it coming for me
sa.Fill(ds)
DropDownList1.DataTextField = ds.Tables(0).Columns(1).Caption
DropDownList1.DataValueField = ds.Tables(0).Columns(0).Caption
DropDownList1.DataSource = ds.Tables(0)

DropDownList1.DataBind()
Thanks
Sathi
 

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. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,780
Messages
2,569,610
Members
45,255
Latest member
TopCryptoTwitterChannels

Latest Threads

Top