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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T05:45:29+00:00 2026-06-04T05:45:29+00:00

Using: ASP.NET 4, SQL 2008, C# I’m writing a web app for our projects

  • 0

Using: ASP.NET 4, SQL 2008, C#

I’m writing a web app for our projects team to keep track of special project users. One thing they have asked is to export quick lists of data that they use often. For instance, what I’m trying to do here is give the team a button which will populate a TextBox with all the various email addresses that are saved in our SQL DB.

What I’ve been trying to do is bind the TextBox to a specific column in the DB. I already have a connection to the DB, and I’ve built a DataSet that queries for that specific column, and it works normally.

My question is, how do I tell ASP.NET to use the data from the DataSet to populate the Textbox? Here is the code I’m working with so far:

protected void btnGetNPMEmailAddresses_Click(object sender, EventArgs e)
    {
    txbResults.Text = "";
    txbResults.DataBind(ObjectDataSource_Designee_EmailAddresses) // ??? My DataSet
    }

I’m definitely crawling my way up the C# learning curve. Any help would be greatly appreciated!

Thanks,
Paul D.

  • 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-04T05:45:30+00:00Added an answer on June 4, 2026 at 5:45 am

    Try something like this:

    protected void btnGetNPMEmailAddresses_Click(object sender, EventArgs e)
    {
        // TODO:: Populate ObjectDataSource_Designee
        DataSet dataSet = GetDS(ObjectDataSource_Designee);
    
        string emails = string.Empty;
        for (int i = 0; i < dataSet.Tables[0].Rows.Count; i++)
        {
            emails = emails + dataSet.Tables[0].Rows[i]["EmailAddresses"].ToString() + Environment.NewLine;
        }
        txbResults.Text = emails;
    }
    
    private DataSet GetDS(ObjectDataSource ods)
    {
        var ds = new DataSet();
        var dv = (DataView)ods.Select();
        if (dv != null && dv.Count > 0)
        {
            var dt = dv.ToTable();
            ds.Tables.Add(dt);
        }
        return ds;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an asp.net web application written in C# using a SQL Server 2008
I'm developing an ASP.NET app (C#) that connect to SQL Server 2008 using ADO.NET
We've an ASP.Net MVC2 web app (SQL 2008 in backend). We use Data Annotations
We have a wonderful ASP.NET MVC 2 web application using MS SQL 2008 and
I am developing one web application using asp.net 2005 and Microsoft SQL Server 2008
I am busy creating a asp.net web site and using MS SQl 2008 as
I am developing a web application using ASP .NET 2.0, VS 2008 and SQL
I am using VSTS 2008 + C# + .Net 3.5 + ASP.Net + SQL
I'm using ASP.NET 4, EF 4 and FILESTREAM in SQL 2008 to add/read files
using asp.net, sql server 2008, winserver2003 we have about 10 tables with about 20

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.