I had a <asp:SqlDataSource
connected to a database using a connection string however I wanted to have 2 columns merged together to create 1 column such as:
Column: First Name
Column: Last Name
Creates:
Column: Full Name
I had a hard time finding how to do this in aspx but a really easy time finding this to do in the page directly.
My Sql Data Source was as follows:
<asp:SqlDataSource ID="databaseWork" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString%>" SelectCommand="SELECT [FirstName],[LastName] FROM [People]">
</asp:SqlDataSource>
I wanted to have them in a drop down list. My drop down list was:
<asp:DropDownList ID="ddlPeople" runat="server" AutoPostBack="True" DataSourceID="databaseWork" DataTextField= 'FirstName' DataValueField="ID">
</asp:DropDownList>
No matter what I did nothing seemed to work, I went to multiple sites and tried many things however I figured it out on my own that I could just modify the SQL Query and create my own column instead of concatenating fields together when I used them.
I am adding an answer to my own question as I believe it will be very helpful to others who want the same result.