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 1035819
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T14:36:11+00:00 2026-05-16T14:36:11+00:00

Simply put: My model has two tables, Concepts and Transactions, which gives birth to

  • 0

Simply put: My model has two tables, Concepts and Transactions, which gives birth to two controllers of the same name. Transactions has a foreign key pointing to the primary key of Concepts (so you have a transaction like “$200 spent yesterday on concept 1”, and concept “1” being “gas”). In the Transactions Index view, I want to show, instead of the concept ID behind the transaction, the description of the concept.

In plain Web Forms, I would do a look up to the DB and done. But in MVC, what would be the recommended way to do it?

Here’s a snippet of my Transactions Index view:

    <% foreach (var item in Model) { %>

    <tr>
        <td>
            <%: Html.ActionLink(Resources.ActionEdit, "Edit", new { id=item.Id }) %> |
            <%: Html.ActionLink(Resources.ActionDetails, "Details", new { id=item.Id })%> |
            <%: Html.ActionLink(Resources.ActionDelete, "Delete", new { id=item.Id })%>
        </td>
        <td>
            <%: item.Id %>
        </td>
        <td>
            <%: String.Format("{0:g}", item.Date) %>
        </td>
        <td>
            <%--**DISPLAY THE CONCEPT DESCRIPTION FOR THIS item.ConceptId HERE** --%>
            <%--<%: item.ConceptId %>--%>
        </td>

Thanks!

  • 1 1 Answer
  • 1 View
  • 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-16T14:36:12+00:00Added an answer on May 16, 2026 at 2:36 pm

    If you are using Linq to SQL (or any similar ORM), you should already have support for:

    <%: item.Concept.Description %>
    

    …That is, if your ORM provides support for relationships between the database tables.

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

Sidebar

Related Questions

Simply put I'm trying to sync two slideshows created using widgetkit lib in a
Simply put, MVC is the pattern for separating contents (model) from presentation (view), and
Simply put, I'd like to be able to convert any string to an integer,
Simply put: What is the most effective way to share / reuse code between
Simply put I want what http://www.reddit.com/ and http://news.ycombinator.com/ have to the left of every
Simply put, I'm getting this error in the Product Admin of Magento after adding
The issue: Simply put, my Progress dialog continuously says downloading data rather than opening
I'm trying to show/hide( or simply put - filter ) my markers( of houses
Am I missing something completely. How can we simply put the value in definition
I am working on implementing an ISrollInfo interface for a custom control. Simply put,

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.