I assume you mean it works fin in development, but doesn't when I publish it to a web site?
If so, then no, it won't work. C# code is executed on the server, not the client. So your "Beep" is sounding in the server room, miles away from the client. And probably annoying the heck out of the host admin.
It appeared to work in development, because the server and the client were the same computer.
Have a look here:
Playing sound on client asp.net[
^] - it's google, and you should find the info you want.