Well from a girl's point of view I recommend:
- To ask her face to face, rather than over the phone etc, cos it shows that you have confidence
- Look her in the eyes and ask, don't like stare at her boobs or lips LOOL
and finally
- Be confident when asking her to the formal. Don't hesitate, but...