Click here to Skip to main content
15,888,984 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello Guys, I am currently trying to build a game in ASP.NET. I am struggling with implementing different sound effect. I would like to give the user the ability to click on the button, and then hear the sound. Is there any way to do it? Thanks

What I have tried:

I have found this: https://stackoverflow.com/questions/12329191/how-do-i-play-a-sound-in-an-asp-net-web-page .
Posted
Comments
Dave Kreskowiak 1-Mar-18 8:50am    
Your probably having problems because you don't realize that ASP.NET code runs entirely on the server only, NEVER the client side.

The sound effects have to be done in client-side javascript or some game engine on the client-side.

This really has nothing to do with ASP.NET.
Member_001 1-Mar-18 8:52am    
I have found this: https://stackoverflow.com/questions/12329191/how-do-i-play-a-sound-in-an-asp-net-web-page , do you think I should use that as a guidance?
F-ES Sitecore 1-Mar-18 9:13am    
Yes you can use that for guidance, as long as you actually take on-board the advice given....that it's not possible to do from asp.net code.
Member_001 1-Mar-18 9:37am    
Thanks!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900