We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Close Icon
Unfortunately, activation email could not send to your email. Please try again.
Close Icon
close icon
Vote for your favorite ebook
Succinctly Readers Awards 2020
Syncfusion Feedback

binding data with label

Thread ID:





48561 Aug 30,2006 07:14 PM UTC Nov 12,2006 07:26 AM UTC ASP.NET Web Forms (Classic) 1
Tags: FAQ
Administrator [Syncfusion]
Asked On August 30, 2006 07:14 PM UTC

hi all

how can i bind data in table with label control?
(label control is not inside any parent control, its an independent control in the webform.)


Replied On November 12, 2006 07:26 AM UTC

Simply use the label's text property with the data

for eg when u use the datareader to fetch the data from the database

use the following code

dim cmd as new Sqlcommand
cmd.connection =conn
cmd.commandText="Select name from EmployeeMaster"

dim rd as datareader

if not isdbnull(rd.item("name"))
label1.text =(rd.item("name"))



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon