Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Binding data in the Dropdownlist!

Status
Not open for further replies.

z07924

IS-IT--Management
Feb 18, 2002
122
GB
I want to add a dropdownlist box in the form. In that I want to add records that are coming from the database.
Rightnow I have a dropdown box shows up in the screen, but I want to add some data that are coming from the database.
I don't know, How to do it in ASP.Net?.

Any help would be appreciated.

Thanks in Advance,
LAks
 
Easiest way would be to get the data back in a dataset, and then do this:

With ddlDropDownList
.DataSource = DataSet
.DataTextField = "Field you want displayed"
.DataValueField = "Field with associated value"
.DataBind
End With

That should do it

hth

D'Arcy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top