1 Replies - 300 Views - Last Post: 04 December 2011 - 09:17 PM Rate Topic: -----

#1 hawkster3269  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 04-December 11

How to pull information from database and put in labels

Posted 04 December 2011 - 09:06 PM

I'm currently working on my thesis for school and am stuck with the most important part of my project. I am using asp.net 4 and c# in visual studio 2010, and I have information stored in a database that i need to pull out in order to display in on a web page.

Ex: there is only one table in the database and it has a column for 'text'. i need to pull out what is in the text column and display it in a label on the page. i have done this in the past but i cannot remember how to do it.

i'm imagining something along the lines of:

label.text = ____________.ToString();

or something along those lines but i am at a complete loss as to how to go about this. if someone could let me know what i can do that would be great.

Is This A Good Question/Topic? 0
  • +

Replies To: How to pull information from database and put in labels

#2 tlhIn`toq  Icon User is offline

  • Please show what you have already tried when asking a question.
  • member icon

Reputation: 5442
  • View blog
  • Posts: 11,676
  • Joined: 02-June 10

Re: How to pull information from database and put in labels

Posted 04 December 2011 - 09:17 PM

There are numerous database tutorials here on DIC that can teach you how to do this.
Just check under the 'Tutorials' menu option at the top of the page.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1