showing data using DataRow

G

Grant Merwitz

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


Members online

Forum statistics

Threads
473,744
Messages
2,569,481
Members
44,900
Latest member
Nell636132

Latest Threads

Top