The Poppies produced one of their best performances of the season as goals from Will Grocott, Spencer Weir-Daley and Rene Howe made it three matches without defeat.
Kettering are still hoping to launch a late charge towards the play-off places in the Evo-Stik Southern League Premier Division.
They currently sit eight points behind fifth-placed King’s Lynn Town with four games in hand ahead of the weekend’s trip to struggling Histon.
And Law was pleased to see his team learn their lesson after last week’s disappointing 1-1 draw with Frome Town.
Police watching out for 'people of interest' as Poppies prepare for Telford clash
Attenborough ‘absolutely delighted’ as nine-man Corby triumph
Game management disappoints Poppies boss Glover
‘Bonkers decision’ is key as Diamonds are beaten
VERDICT: Defensive lapse proves costly as Poppies are held
“We carried on from what we did in the first half against Frome but coming in just 1-0 up at half-time, you were maybe thinking ‘here we go again’,” Law said.
“But I think the experience of last week and having another game under our belts helped and our game management was a lot better.
“We saw out a very difficult spell when it was 2-0 and I think we thoroughly deserved it in the end.
“I can go back to the King’s Lynn game on Boxing Day when our approach play was excellent and even at Weymouth and Chippenham when we were doing our one-touch stuff, that proved we can open any side up.
“It’s just a matter of being ruthless and in the second half last night we were. We could have had a few more.
“Goals change games and make life easy. We have come through in the end and now we have to push on.”
Weir-Daley, meanwhile, grabbed his second goal in three games for the club since joining on loan from neighbours Corby Town for the rest of the season.
And he insists the Poppies are just focused on trying to keep their good run going.
“There were a lot of chances and a lot of nice play in and around the box,” the striker said.
“We are beginning to get used to each other and Dorchester are a good side.
“They are organised and committed so it’s a positive result against a team who are play-off contenders as well as ourselves.
“We know what is at stake in every game. We are unbeaten in three matches and we just want to keep it going.”
Read more from Marcus Law and Spencer Weir-Daley in this week’s Northamptonshire Telegraph