It's your select command, you never selected mfgID, so you cannot use it in part of the ddl. The query only has information of the UserID and the Full Name as techid. So when you ask for mfgID, it goes "what the.. what do you want? Do you want UserID or do you want techid? What is mfgID?"

You're also only selecting the user information from aspnet_users. Within the table aspnet_users, do you have a field called mfgID? If so, add it to the select statement after techid:

SelectCommand="SELECT [UserID], [FirstName]+ ' ' + [LastName] AS techid, [mfgID] FROM [aspnet_Users] WHERE [isTech] = 'True' ORDER BY [LastName], [FirstName]">

Ah, crap, I just noticed it was the wrong datasource. Here is the right one.

<asp:SqlDataSource 
                                                                                ID="Equipment" 
                                                                                runat="server" 
                                                                                ConnectionString="<%$ ConnectionStrings:HRIServiceConnectionString1 %>" 
                                                                                SelectCommand="SELECT a.Company, b.Description FROM Manufacturers a JOIN Equipment b ON a.mfgID=b.mfgID">
                                                                                <SelectParameters>
                                                                                <asp:ControlParameter 
                                                                                ControlID="DropDownList1"
                                                                                Name="cusID"
                                                                                PropertyName="SelectedValue" 
                                                                                Type="String" />
                                                                                </SelectParameters>
                                                                            </asp:SqlDataSource>

Same thing though, just add mfgID to the SELECT portion of the SelectCommand:

SelectCommand="SELECT a.Company, b.Description, a.mfgID FROM Manufacturers a JOIN Equipment b ON a.mfgID=b.mfgID">

getting closer... Its showing an the mfgID. I need it to show the MFG company name and Description in the ddl.

How long is the description? You don't want this ddl to run off the page.

Here's the code for DDL:

<asp:DropDownList ID="DropDownListEquip" runat="server" CssClass="maintext" 
                                                                                DataSourceID="Equipment" DataTextField="CompanyEqpDesc" DataValueField="mfgID">
                                                                            </asp:DropDownList>

Here's the DataSource:

<asp:SqlDataSource 
                                                                                ID="Equipment" 
                                                                                runat="server" 
                                                                                ConnectionString="<%$ ConnectionStrings:HRIServiceConnectionString1 %>" 
                                                                                SelectCommand="SELECT a.Company + ' - ' + b.Description As CompanyEqpDesc, a.mfgID FROM Manufacturers a JOIN Equipment b ON a.mfgID=b.mfgID">
                                                                                <SelectParameters>
                                                                                <asp:ControlParameter 
                                                                                ControlID="DropDownList1"
                                                                                Name="cusID"
                                                                                PropertyName="SelectedValue" 
                                                                                Type="String" />
                                                                                </SelectParameters>
                                                                            </asp:SqlDataSource>

It broke the page:

Server Error in '/HRIService' Application.
The data types text and varchar are incompatible in the add operator.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: The data types text and varchar are incompatible in the add operator.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Oh you have two different data types. You first have to convert them. Okay, here's the new select statement:

SelectCommand="SELECT CONVERT(TEXT, a.Company) + ' - ' + b.Description As CompanyEqpDesc, a.mfgID FROM Manufacturers a JOIN Equipment b ON a.mfgID=b.mfgID">

I went back to the old select and just changed my db. That worked!

Yup that would too lol.

Glad to help.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.