I want to know how to put a audio in website by using c# on code behind page.
I had used some code like
System.Media.SoundPlayer player = new System.Media.SoundPlayer(Server.MapPath("~/available.wav"));
player.Play();
it is working fine on my local host but not working after hosting on server.
The main motive of my work is to play a sound like "Seat is available" after checking database for available seat and if seat is not available than it play a sound like"Seat is unavailable". All work is done on button click event.
I need the solution as soon as possible, so please help me.


Ankur JainRank #2,475 · 567 reputationPosted Jul 5, 2015, 11:18 PM EDT
Ashutosh Tripathi51 reputationPosted Jul 6, 2015, 6:46 AM EDT