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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T04:05:40+00:00 2026-06-06T04:05:40+00:00

I have Question and QuestionTypes. In Question table there is a foreign key that

  • 0

I have “Question” and “QuestionTypes”. In “Question” table there is a foreign key that refrence the other table. I want to show question attributes with type name.

Repeater code:

<ItemTemplate>
    <tr>
        <td>
             <%#Eval("QuestionSubject")%>
        </td>
        <td>
             <%#Eval("Question")%>
        </td>
        <td>
             <%#Eval("QuestionTypeName")%> //I want to get question typename
        </td>                          //TypeName is in other table
    </tr>
</ItemTemplate>

And here is code behind:

private IEnumerable<TableSurveyQuestion> Questions()
{
    int survey_id = Int32.Parse(Request.QueryString["survey_id"]);
    IEnumerable<TableSurveyQuestion> questions= db.TableSurveyQuestions.Where(a => a.SurveyId == survey_id);
    return questions;
}

I bind this founction to repeater data source.

I tried select new TableQuestions {typeName=x.TableQuestionTypes.TypeName} but this did not work.

In mvc I get it like this question.TableQuestionType.TypeName. How do this in ASP.NET web forms.

Thanks.

  • 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-06-06T04:05:43+00:00Added an answer on June 6, 2026 at 4:05 am

    I found it

    var sorular = from soru in db.TableSurveyQuestions
                      where soru.SurveyId == anket_id
                      orderby soru.QueueNo, soru.Subject ascending
                      select new
                      {
                          soru.TypeId,
                          soru.Subject,
                          soru.QuestionId,
                          soru.SurveyId,
                          soru.QueueNo,
                          SurveyTitle = soru.TableSurvey.Title,
                          TypeName = soru.TableSurveyQuestionType.TypeName,
                          SoruSayisi = db.TableSurveyQuestions.Where(a => a.SurveyId == anket_id).Count(),
    
                          Secenekler = from secenekler in soru.TableSurveyOptions
                                       select new
                                       {
                                           OptionId = secenekler.OptionId,
                                           OptionName = secenekler.OptionName,
                                           QuestionId = secenekler.QuestionId,
                                           VoteCount = secenekler.TableSurveyVotes.Count
                                       }
                      };
    

    thanks.

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

Sidebar

Related Questions

I have question about database optimizing, indexing. I have table that called projects and
I have question about python and sqlite3. I want to drop a table from
I have question concerning a function I created. I would like to show the
I have a question related to this one . I don't want to do
I have question to Java or C# programmers. I want to render some pages
I have a simple database that has the following relation Each Question has one
I have question will the click event or any other event run in document.ready()
I have question that if I have date as string in one column of
I have question for you ... I have UITableView and I want to catch
I have a complete Form Creation System. There are many different Question Types and

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.