FrankSharp
FrankSharp

Reputation: 2632

Vb.net DataTable

I fill a data table with 11 columns and 1 row.

columns/   User        Pass 
Row /   **User2054**   1234 

I Have a Label named lblUser and I want to put the value = User2054 from Table(Collumn[0], Rows[0])

How can I fill it?

Thank's for helping me!

Upvotes: 1

Views: 692

Answers (1)

LarsTech
LarsTech

Reputation: 81675

Assuming the user name is the first column:

lblUser.Text = myTable.Rows(0)(0).ToString

Alternatively, you could use the column name:

lblUser.Text = myTable.Rows(0)("User").ToString

Upvotes: 2

Related Questions