Cooper was given his marching orders after elbowing Cardiff's Jason Perry in the face as they went up to contest a throw-in inside the Northampton half. The referee, John Kirkby, had already booked five players for lesser offences and appeared to have little option but to show Cooper the red card.
As so often happens, though, instead of lifting Cardiff's hopes, the sending-off inspired a Northampton side which up until then had seemed content to sit back and soak up the pressure.
Parrish collected a loose ball just inside his own half when Northampton broke up another Cardiff attack. The defence backed away from him, allowing him to run straight through the middle before lobbing Steve Williams from just outside the penalty area.
Cardiff now have a huge task on their hands if they are to haul themselves back into the tie in the second leg at Sixfields on Wednesday, especially as Northampton have a vital away goal to take back with them.
Goal: Parrish (77) 0-1.
Cardiff City: Williams; Jarman, Lloyd, Perry, Young, Fowler, Eckhardt (White, 79), Stoker (Rollo, 87), Dale, Haworth, Middleton. Substitute not used: Philliskirk.
Northampton Town: Woodman; Clarkson, Frain, Sampson, Warburton, Rennie, Parrish, Grayson (Lee, 87), Gayle (Peer, 84), Cooper, Hunter. Substitute not used: Gibb.
Referee: J Kirkby (Sheffield). Bookings: Cardiff: Young, Fowler, Haworth. Northampton: Parrish, Gayle. Sending-off: Northampton: Cooper. Attendance: 11,369.Reuse content