I have a simple C# windows form in which I have 6 text-boxes. Now I have a SQL query which returns 3 rows (it will always return 3 rows - query gets data from junction table and another table) and each row has 2 columns (Name and Email). What I want to do is populate these 6 text-boxes with the result from sql query like Name 1 & Email 1 should get the value of row 1, Name 2 & Email 2 should get the value of row 2 etc etc.
I have searched here and there but I haven't been able to find a solution so please help me out. I know I need to apply some loop here but I am not able to find the logic here.
Images for reference :
SQL Query Result :

C# Win Form :

Code (which is obviously not the way to do it) :
SqlDataReader rdr = null;
SqlConnection con = null;
SqlCommand cmd = null;
String Name;
String Email;
string ConnectionString = "// my connection string...";
con = new SqlConnection(ConnectionString);
con.Open();
string CommandText = "//sql query goes here";
cmd = new SqlCommand(CommandText);
cmd.Connection = con;
rdr = cmd.ExecuteReader();
while(rdr.Read())
{
Name = rdr["Name"].ToString();
Email = rdr["Email"].ToString();
}
con.Close();