I have a page that calculates certain values coming from a web service.
I would like to be able to play different sounds based on the calculation results. There must be no interaction from the user (click button to play).
The SoundPlayer class seems like what I need but I believe there is an error with the relative path because if I specify the absolute path it does work.
System.Media.SoundPlayer playthewavfile = new System.Media.SoundPlayer(@"Sounds\sound1.wav");
playthewavfile.Play();
The Sounds folder is in the root of the website.