Northampton climbed out of the relegation zone thanks to a brace from Adebayo Akinfenwa against Aldershot.
The Cobblers took the lead when Ben Tozer's long throw-in was helped on by Akinfenwa and defender Kelvin Langmead volleyed home.
Another Tozer long throw was headed in by Akinfenwa, who scored his second from the penalty spot after Michael Jacobs had been tripped by Josh Payne.
Danny Hylton grabbed a consolation in stoppage time for the Shots.
Luke Guttridge played for Northampton after manager Aidy Boothroyd had
The midfielder, who was released by Aldershot to join the Cobblers in January, had a "gentleman's agreement" with Shots boss Dean Holdsworth that he would not play against them this season.
VIEWS FROM THE DRESSING ROOM
Aldershot boss Dean Holdsworth told BBC Surrey:
"Northampton had the desire to get on the end of two long throws and they got their rewards for their set pieces. Our inability to deal with two set-pieces was poor.
"Tactics, methods and systems go out the window when a bloke can throw a ball into the box and we can't deal with it. I'm disappointed and the players know it.
"My biggest concern is, is this team going to take us to another level, which is what I want? Are the players able to do that? I'm looking for the players to tell me they can stay here and be part of something."
Northampton Town manager Aidy Boothroyd told BBC Radio Northampton:
"I thought it was a comprehensive performance. I thought we looked very strong and very organised.
"I thought we mixed up our game really well. We got what we deserved.
"We've still got lots to do, I'm under no illusions, but I'm really pleased with the result."