A couple of times...
Usually for mucking around at lunchtime. For some reaon in middle school we wern't allowed inside during lunch break except to go to the library, toilet or a couple of study rooms. Anyway me & my friends always used to play hide & seek en masse. Like 25 of us... around the entire school. Unfortunatly the best hiding places were the places we weren't supposed to go. So i often ended up in detention for being in the wrong place :p The headmaster often had a room full of people at lunchtime doing lines. I occasionally ended up in there
It was the same in high school. Always hanging out where we weren't supposed to be and getting moved along. Dont think i ever got detention there though.
I stand on my record though. I never got a detention for not doing work. Despite doing less than half of all homework throught my school career
It's so easy to talk your way out of. Teachers don't like sitting in at lunch or after school either. Tell them you'll bring it tommorow then avoid them for the rest of the week