I have a dataset which I am binding to a listbox. However, I want to combine two of the fields to make up the DataTextField. Is this possible, or am I going to have to loop through the Data Rows?
lstAddressDropdown.DataSource = dsAddress;
lstAddressDropdown.DataTextField = "StreetAddress" + "Place";
lstAddressDropdown.DataBind();
lstAddressDropdown.Items.Insert(0, new ListItem("Please select"));
It's worth noting that the dataset comes back from a web service so I can't change any stored procedure to combine the columns there.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…