why not try teaching him to stay out ??? GOOD GOD why are some ppl always looking for ways to not have to do the work..
why not close the door ( if you have one) alt. get a ( what do you call it ?? ) like a small fence while you are working on it...
there are kinder ways.
Try a baby gate? It will do the job as well, I know some dogs can be stubborn about staying out of a room but having electrical barriers is not good. Just my 2 cents