my understanding is that you have to catch him in the act and say NO immediately, otherwise, the events just don't connect in their heads. if you put him in the crate after the fact, i'm not sure if he'll understand why.
i have my pup confined in the kitchen and check the floors everytime i step into the kitchen so there's not "surprise" pee or poo sitting anywhere. If he goes off the pad, i just clean it up and mumble to myself.... but i don't reprimand him.
since i live in a highrise with no patio or yard, i started on indoor training my pup. nowadays, he'll actually wait to get back indoors before does his business. he won't go outside. i hope to eventually both indoor and outdoor train him.... eventually...