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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T05:42:51+00:00 2026-06-01T05:42:51+00:00

using Visual.Web.Developer.2010.Express; using SQL.Server.Management.Studio.2008.R2; Kinda new at C# here.. I got the first row

  • 0
using Visual.Web.Developer.2010.Express;
using SQL.Server.Management.Studio.2008.R2;

Kinda new at C# here..
I got the first row of the collumn, but how do I retrieve the rest of the values?
I have some textboxes set up, and a sqldatareader putting the first value into the first textbox investigate1. Right now, I have it set up so that all the textboxes are printing out the first row of that collumn.. Stuck at this part.. want to get the others in there to.. The value “a” into investigate1, the value “b” into investigate2, etc.. Thanks for looking

My relevant code

HTML

<asp:TextBox ID="investigate1" class="hexen" runat="server"></asp:TextBox><br />
<asp:TextBox ID="investigate2" class="hexen" runat="server"></asp:TextBox><br />
<asp:TextBox ID="investigate3" class="hexen" runat="server"></asp:TextBox><br />
<asp:TextBox ID="investigate4" class="hexen" runat="server"></asp:TextBox><br />
<asp:TextBox ID="investigate5" class="hexen" runat="server"></asp:TextBox><br />

C#

 try
            {

                ConnFlux.Open();

                SqlCommand CmdFlux1 = new SqlCommand("select TbValue from InvestigateValues where TbId = '1'", ConnFlux);


                RdrFlux1 = CmdFlux1.ExecuteReader();



                while (RdrFlux1.Read())
                {
                    investigate1.Text = RdrFlux1.GetValue(0).ToString();
                    investigate2.Text = RdrFlux1.GetValue(0).ToString();// What would I have
                    investigate3.Text = RdrFlux1.GetValue(0).ToString();// to change about these
                    investigate4.Text = RdrFlux1.GetValue(0).ToString();// to print the corresponding
                    investigate5.Text = RdrFlux1.GetValue(0).ToString();// values to the corresponding textbox?

                }
            }

sqldb
Yes, these are the only two columns in this database

My Sql database

  • 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-01T05:42:52+00:00Added an answer on June 1, 2026 at 5:42 am

    Rather than using 5 separate TextBox controls, you may want to investigate using a Repeater control. The Repeater control will be able to handle cases when you have more or less than 5 records in your database.

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

Sidebar

Related Questions

I'm using Visual Web Developer 2010 Express and SQL Server 2008 R2 Management Studio
using Visual.Web.Developer.2010.Express; using SQL.Server.Management.Studio.2008.R2; What I'm ultimately trying to do is update a sql
using Visual.Web.Developer.2010.Express; using SQL.Server.Management.Studios.R2.Express; What I'm trying to do, is get a button to
I created a new ASP.NET website using Visual Web Developer 2008 Express edition and
Hi all I've just started a new project using Visual Web Developer 2008 Express
I'm using Visual Web Developer 2010. I created a sql server connection to a
I'm building an ASP.net application using Visual Studio Web Developer 2010 Express and have
I am using Microsoft Visual Web Developer 2008 Express. I've made an ASP.NET MVC
Using Visual Studio 2008 and built-in web server. In a Web Handler .ashx file
I am creating two tables in Visual Web Developer 2010 Express using the following

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.