3
Contributors
2
Replies
14
Views
4 Years
Discussion Span
Last Post by Ketsuekiame
0

No clarity in your question. In which way do u want to retrieve data from database. If you know how to retrieve data from database as a table. Then simply write the below code.

listbox.DataSource = data;//Your data table from database
listbox.DataTextField = "FieldName";//The name of the column in the data table to set text(which is visible)
listbox.DataValueField = "FieldID";//The name of the column in the data table to set value.
listbox.DataBind();// To bind data.
0

Please show some attempt to solve this yourself. We can answer specific queries, but we aren't really into doing other peoples work/assignments/coursework for them, especially when they put no effort in themselves.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.