Can anyone point me to an example on the net of how to bind a drop box
on a Web form using VS2003.net? for some reason, I can't get my drop box
or list box to bind to my dataset. I am using VB.Net.
Help appreciated.
Frank
*** Sent via Developersdex http://www.examnotes.net ***
Don't just participate in USENET...get rewarded for it!ddl.DataSource = ds.Tables[0]
ddl.DataTextField = "ColumnText"
ddl.DataValueField = "ColumnValue" // usually id
ddl.DataBind()
where ddl is DropDownList or ListBox and ds is your DataSet.
Hope this helps!
Regards,
Kostadin Kostov
"Frank Bishop" wrote:
> Can anyone point me to an example on the net of how to bind a drop box
> on a Web form using VS2003.net? for some reason, I can't get my drop box
> or list box to bind to my dataset. I am using VB.Net.
> Help appreciated.
> Frank
>
> *** Sent via Developersdex http://www.examnotes.net ***
> Don't just participate in USENET...get rewarded for it!
>
Hi Frank
Try this:
mylist.dataSource=ds
mylist.dataMember="MyTable"
mylist.dataTextFiled="MyDataCoulum" '' this is the most
important
mylist.dataBind()
"Frank Bishop" wrote:
> Can anyone point me to an example on the net of how to bind a drop box
> on a Web form using VS2003.net? for some reason, I can't get my drop box
> or list box to bind to my dataset. I am using VB.Net.
> Help appreciated.
> Frank
>
> *** Sent via Developersdex http://www.examnotes.net ***
> Don't just participate in USENET...get rewarded for it!
>
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment