Click here to Skip to main content
15,867,307 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi.Iwant to play mp3 or any type of sound on clicking a particular button in my
asp.net web page..If any one knows about this plz send me the code at

[emailremoved]
Thanking You...
Posted
Updated 24-Nov-11 23:01pm
v2

Hi checkout this link

http://geekswithblogs.net/ranganh/archive/2008/09/19/asp.net-mediaplayer-control---playing-audio-files.aspx[^]

hope it helps!

mark this answer if it solved your problem

thanks..
 
Share this answer
 
You can use Windows Media Player control:
http://msdn.microsoft.com/en-us/library/bb248593%28VS.85%29.aspx[^],
http://msdn.microsoft.com/en-us/library/dd563946%28VS.85%29.aspx[^].

You can find wrappers for 3rd-party or Open Source players. For example, look at one for VLC:
http://en.wikipedia.org/wiki/VLC_media_player[^],
http://wiki.videolan.org/.Net_Interface_to_VLC[^].

Now, low-level: please see this CodeProject article: A low-level audio player in C#[^].

[EDIT]

This is the updated useful information on the VLC component binding for.NET:
http://sourceforge.net/projects/libvlcnet/[^],
https://wiki.videolan.org/C_Sharp/[^],
https://wiki.videolan.org/.Net_Interface_to_VLC/[^].

Notably, you can find material for using the component for both WPF and System.Windows.Forms.

—SA
 
Share this answer
 
v2
Try using this html5 tag:

XML
<audio src="song.ogg" controls="controls">
Your browser does not support the audio element.
</audio>


For your reference:
http://www.w3schools.com/html5/[^]

Please mark this as correct solution if it fixed your problem.

Best regards,
Eduard
 
Share this answer
 

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