How to handle relevant, but disruptive, questions
As a student, I find that waiting to ask all questions in office hours or the end of class is not a great solution. I don't mind delaying non-urgent questions, but sometimes if I don't understand something presented in the first ten minutes of the class, I might then miss out on the rest of the lecture if I don't have a chance to ask a question. So I appreciate when instructors give students some chance to ask questions during the lecture.

A good way to allow this and also control when and how many questions are asked is to invite questions in each class at times of your choosing (and let students know you'll be doing this).

At the beginning of the lecture, say, "I'll pause and ask for questions at regular intervals, so you'll have a chance to ask your questions then."

Decide ahead of time where you will pause and ask for questions (at convenient places to break the lecture, or places where you know students often have questions).

During the lecture, pause at the predetermined places and say something like:


  "I'll pause for questions now. We have time for three or four questions."


(and you can decide how many questions to take depending on how the lecture is going, time-wise.)

Students with too many questions in office hours are an entirely different issue. You should ask these students to schedule a separate appointment, and determine whether the questions are a sign of a problem (i.e. they may need tutoring or similar services) or a good thing (i.e. they are looking for enrichment and need some pointers on how to find it).