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

  • Home
  • SEARCH
  • 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 4626642
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T03:27:01+00:00 2026-05-22T03:27:01+00:00

In my web forms, I have text boxes and one radiolist which I need

  • 0

In my web forms, I have text boxes and one radiolist which I need to populate through a LINQ2SQL query. So far I coded this query to fetch particular records which is going to be populated into the DB.

 using (dbTestDataContext db = new dbTestDataContext())
        {
            var query = from r in db.Table1
                        where r.Code == getCode
                        select new
                        {
                            //Account Info
                            r.Name,
                            r.Num,
                            r.AcctNum,
                            r.CorpAcct, //Bool


                        };
        };

Now I know that the record which this query is going to be fetching is gonna be only 1 unique record. I want to show the record in these textboxes and select that radio button:

tbName
tbNum
tbAcctNum
rbtnCorpAcct

How should I do this? Thank you 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-22T03:27:02+00:00Added an answer on May 22, 2026 at 3:27 am

    Same as others have answered with addition of radio button:

    tbName.Text = query.Name;
    tbNum.Text = query.Num;
    tbAcctNum.Text = query.AcctNum;
    
    if(query.CorpAcct)
        rbtn.SelectedValue = "Yes"; \\Where "Yes" is one of the radio button values
    else
        rbtn.SelectedValue = "No";
    
    \\Could also use SelectedIndex, rbtn.SelectedIndex = 0 or 1
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using web forms I know that you can only have one ASP.NET form on
I have a web page with 3 forms on it. Not nested, just one
I have two web forms which are filled in by the user. They contain
I have my web browsers set to save what I type into text boxes
I have several text boxes in an ASP.NET Web Form. I want to ensure
I'm creating a few web forms that have areas to them. Are fieldsets viable
I have a simple ASP.NET 3.5 SP1 Web Forms app... I've added the System.Web.Routing
I have a web report that uses a Django form (new forms) for fields
I have a Windows forms project and a Web Service project in my solution,
I have authentication mode set to forms in my asp.net web.config but am still

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.