--VB.NET----
Kindly help me this
I need to populate listbox datavaluefield with multiple field. The value will be coming to datatable - (dataset). I can't change the sql statement because it is under stored proc that uses globally
lstSearchResult.DataSource = dt
lstSearchResult.DataValueField = "EMP_ID" & "LNAME" &"ADD" ->> could it be possible
lstSearchResult.DataTextField = "LNAME"
lstSearchR开发者_开发问答esult.DataBind()
thanks...
Spin through the DataTable and add a new ListItem for each DataRow, concatenating the different fields when making the ListItems. You can't bind two fields as the DataValueField.
精彩评论