If she takes me by surprise I have reacted with a startled "OW!!" which is sometimes unintentionally effective too but, with younger kids, can just be seen as funny so I don't purposely use it as a strategy. I think it has worked because it was a genuinely pained, surprised exclamation.
Mother of two spectacular girls, born mid-2010 and late 2012
Like Kate has said, move away from him the moment he does that and an expression to show him that it hurt. No amount of saying 'no' to him is going to help. If he stops immediately and comes to you or your husband, let it pass and try to divert him into doing something else. My niece was like that at 2 and this worked for her. Also make sure if there are any kids around him who do that. Maybe he's picked it up from someone.
My DD is the same age and does the same thing. She left a huge red mark on DH's shoulder because she bit the crap out of him THROUGH a shirt! She's left the most awful bite marks on her own hands because of biting them out of anger. I haven't the foggiest how to get her to stop, especially when she bites her own hands. It's not like we can take those away!
Loving wife of my gamer boy Michael. Blog link in my profile!
I will physically restrain my daughter if need be, like by holding her wrists if she won't stop hitting. If I move away she just follows and gets more worked up, so I just prevent her from hurting me while I calmly explain that I don't like being hit and it hurts. I had a younger cousin who used to get really upset and aggressive sometimes, and I remember showing her how to attack a pillow if she felt the need to lash out and that worked surprisingly well - at first it was just sort of funny, but then she started doing it when she was angry instead of hitting me. Maybe try something along the lines of "I see that you're angry/excited/frustrated/upset so how about we wiggle/run/jump up and down instead of hitting/biting/kicking"