I have a stored procedure named spGetCustomerByCustID that returns all of the fields for a customer whose CustID matches the parameter. I'm using this to populate a drop down with the last names of the customers.
I want the drop down list to be populated with a concatenation of the LastName and the FirstName in that order with a comma and space separating them. So it would be like "Smith, John". It should be easy since my procedure is returning both values. I don't understand how to do this though. I'm not sure if it should be done with the DataTextField or the SelectedValue.
this is the ddl now:
<asp:DropDownList ID="ddlOwner" runat="server" DataSourceID="CustomersDataSource" DataTextField="LastName"
DataValueField="CustID" SelectedValue='<%# Bind("CustID") %>& ...
Go to the complete details ...