Lecture time is a shared resource, but in my experience most professors welcome questions during class. Once a student (the "questioner") has asked a question, other students are made worse or better off: if one of these students ("listeners") prefers hearing the answer to the question, he is better off; if a listener prefers that the lecture continue as if the question had not been asked, he is worse off. Professors rarely have direct information about the preferences of listeners; they know only that the questioner is better off from the answer. Professors typically answer the question and hope that the questioner constitutes a representative sample; I can attest that this is not always, or even often, the case.
I can think of two methods -- there are certainly more -- by which questions that make listeners generally worse off can be deterred:
Comments are open (aren't they always?) for other ideas.
This is a reverse of the usual case. Many times people would be detered
from asking distracting questions in a group and favor going to the
professor after class. In this case questions that would not be asked
face-to-face are being asked in front of a group.
a readily identifiable subset of students must really be pissing you off.
Okay, so I think we've discovered that "shouting down" does not work.
I can't believe that I love the lecture, but can't stand the posturing by
my classmates. Anyone that was truely interested in the material would be
reading before the lecture, and would already know these answers. Why must
people have witnesses to hear their own voices? Do people think the
professor needs reassurance from us asking questions?