Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6064577
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T09:17:43+00:00 2026-05-23T09:17:43+00:00

I know this question has been asked numerous times before, but I feel the

  • 0

I know this question has been asked numerous times before, but I feel the way I am going about this is a little unique so would like to get some more experienced feedback as this is baffling me a little bit.

As it stands, I have a basic ecom system, where clients can add there own products. When they edit the item, I have a section of dropdowns and would like the data to relate to the selections they made initially (to avoid them cocking up mass amounts of data!).

Currently 2 of the 3 drop downs work fine but the 3rd consists on data linked between 2 tables. This is where my problems are starting to occur. I can write to the table fine, but when I call data to the drop down I get the age old “does not contain a property with the name ‘SubCatID'” error!!!

Here is the drop down code:

<li ID="ERow6" runat="server" visible="false"><label>Subcategory</label><span>
 <asp:DropDownList ID="DDL_Subcategory" runat="server" DataSource='<%#Eval("GetSubcat")%>' DataValueField="id" DataTextField="txt" SelectedValue='<%#Bind("SubCatID")%>'></asp:DropDownList></span></li>

and here is the c# I am calling:

GetSubcat = x.DT_Category.DT_SubCategories.Select(i => new { txt = i.SubcatName, id = i.SubCatID}),

How is it that the ID cannot be found????

Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T09:17:44+00:00Added an answer on May 23, 2026 at 9:17 am

    Looking at this line:

    i => new { txt = i.SubcatName, id = i.SubCatID}),
    

    You are creating a new anonymous object with properties txt and id and it looks like you’re binding to SubCatID, correct me if I’m wrong.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know this question has been asked before numorous times but they seem to
I know this question has been asked numerous times but I couldn't find a
I know this question has been asked many times before but I can't find
I know this question has been asked so many times before but I couldn't
I know this question has been asked before, but I feel it wasn't asked
I know this question has been asked many times before but I tried out
I know this question has been asked before, but I ran into a problem.
I know this question has been asked before, but I haven't been able to
I know this question has been asked countless of times. But none of them
Alright, I know this question has been asked before, but mine has a different

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.