Goals from Dunk and Corr gave the hosts all three points with Marc Richards' penalty proving to be just a consolation for the Cobblers.
Town's hopes of salvaging a point were ended when Lawson D'ath received a red card.
Chris Wilder told BBC Radio Northampton: "The squad is disappointed not to have rewarded an unbelievable support.
"We got ourselves back into the game with half an hour to go and I've said to the players that we just got too excited.
"We started rushing our play and the sending off, which I've got no complaints about at all, made it difficult for us."