You read from the DataReader, but you don't check that any rows are returned: so when they aren't you get an error which explicitly tells you just that!
Start by checking the return value:
if (rdr.Read();
{
if(reader[6].ToString() == "Male");
{
...
And the immediate error will go away.
But...the code you show isn't the code you are running, because this won't compile:
SqlCommand newCmd = new SqlCommand(Select * from student)", newCon);
And I suspect that your "real" code is using a WHERE clause to select which student to return info for. And that WHERE clause doesn't work...so no rows are returned.