to one’s surprise (驚いたことに): To her surprise, she won the lottery. (驚いたことに、彼女は宝くじに当たった)

To her surprise, she won the lottery.