showing data using DataRow

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello friends, how ru all,

I want to know how can i display data using Datarow.
 
You might want to be a bit more specific.
but you can get data out of a row as follows:

Say you have the DataRow dr, and its first column is of type string.
And you want to show this on a label on you page

ASPX
<asp:Label id=lbl runat=server />

C#
lbl.Text = dr[0].ToString; //refers to first column in the DataRow

if this column had a label (like it was from a database)
and say that label was called "ClientName", you could call it like this:

c#
lblText = dr["ClientName"].ToString();


Is this what you were looking for?

HTH
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

e.dataItem with XML problem. 2
DataRecordInternal 1
Use of Data Web Controls 3
SQLDataSource\AccessingData\Columns 5
Q: copy of a datarow 6
copy datarow to string array 1
XML Data and ASP.NET 1
DataRow? 1

Back
Top