the magic word .. CONTROL .. some I always use in kids shows is right at start bring out a prize for the best behaved kid ..stick it somewhere visible and use it as running gag/control through he whole show .. when ever a kid start to drift. BIG action LOOK AND POINT … if you set it up right at the start … they will shut right up …
With regards to the “I know how you did that” kid … there are many bits for that, I have one of my own which works on pure kid psychology … I have a book and on the front its says …. KIDS WHO KNOW HOW THE TRICK IS DONE ….in big letters … if a kid start that … I pull out the book and a pen .. look at kid and whats your name .. they say and i say right your name can go in the book if you dont tell … Now this does one of 2 things …. either the kid says ok . you pretend to right the name in the book and just move on … OR … from that moment on every kid in every trick starts to shout the same thing … and then you have a mental running gag for the rest of the show …and either way it has stopped the singe kid problem.
If you choose to take a different route there are many ways to deal with that, another way thats works is the … WOW your special you can help me with the next trick route .. which flips the arrogant little git into your special helper superstar … either way fixing the problem …