explain th datatable
1.0 1


1.00 / 5, 1 vote
C# tablename User

Id int
Email varchar(500)
Password varchar(500)
Name varchar(500)

DATA IN TABLE IS
Id Email Password Name
1 ali@yahoo.com 1234 ali
2 usman@yahoo.com 1234 usman

i ask you about simply datable working

Label1.text=datatable.Rows[0]["Name"].Tostring();

how it wnat to know about datatable.Rows[0] how it retrieve the name across ali@YAHOO.COM when ali login
and how it retrive the name across usman when usman login

bcz i think 1 ali@yahoo.com 1234 ali // this is row 0
2 usman@yahoo.com 1234 usman // this is row1


then how datatable.row[0] work

Recommended Answers

All 2 Replies

tablename User


Collapse | Copy Code
Id int
Email varchar(500)
Password varchar(500)
Name varchar(500)
DATA IN TABLE IS

Collapse | Copy Code
Id Email Password Name
1 ali@yahoo.com 1234 ali
2 usman@yahoo.com 1234 usman
i ask you about simply how datatable working
is

Collapse | Copy Code
Label1.text=datatable.Rows[0]["Name"].Tostring();for Row ali@yahoo.com 1234 ali
and Label1.Text=datable.Rows[1]["Name"].Tostring(); is for row usman@yahoo.com 1234 usman

Collapse | Copy Code
1 ali@yahoo.com 1234 ali // is this is row 0?

2 usman@yahoo.com 1234 usman // is this is row1?

yes

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.