Can you try this:
comm.CommandText = "SELECT Courses.Id, Courses.CourseSubject, Courses.CourseName, Courses.CourseNumber, Courses.CourseDescription
FROM Courses, StudentToCourse, Students WHERE Courses.Id = StudentToCourse.Courseid AND StudentToCourse.Studentid = " + Session["id"];
But it has vulnerabilities. You should add parameters like:
comm.CommandText = "... StudentToCourse.Studentid=@studentID";
comm.Parameters.AddWithValue("@studentID", Session["id"]);
That's better/more secure.