.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Forum >> ASP.Net >> Post New QuestionBookmark and Share Subscribe to Forum

How to Play .mp3 file

Posted By: R@j     Posted Date: December 09, 2008    Points:2   Category :ASP.Net
Hi

I want to Play .mp3 file in my site in ASP.NET(coding in C#).
Plz help me.

Thanks in Advance

Responses
Author: Amit Mehra             
Posted Date: December 09, 2008     Points: 5   

Hi,
You can use ojbect tag to embded windows media player to play MP3 file in your ASP.Net application here is your tag


<object type="audio/x-mpeg" classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" width="336" height="297" bgcolor="#FFFFFF">

<embed pluginspage="http://www.microsoft.com/Windows/MediaPlayer/" name="mediaplayer1" width="320" height="240" loop="false"
src="c:\a.mp3"></embed>
</object>


NOTE: Set its src property to your mp3 file location

Thanks,
Amit
Please "Mark As Answer " if this post help you.
Author: R@j             
Posted Date: December 10, 2008     Points: 5   

Hi Amit Mehra,

Wat are these classid and pluginspage.wats their usage?
I placed the same code and src is changed to my song path.But its not working.
I placed ur code like this

<ASPNetVideo:WindowsMedia ID="WindowsMedia1" runat="server" Height="331px" Width="504px" WindowlessVideo="True" WMode="Window">
</ASPNetVideo:WindowsMedia>

<object type="audio/x-mpeg" classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" width="336" height="297" bgcolor="#FFFFFF">

<embed pluginspage="http://www.microsoft.com/Windows/MediaPlayer/" name="WindowsMedia1" width="320" height="240" loop="false"
src="D:\Play_Song\song\Song.mp3"></embed>
</object>

Plz tell me how it can be done

Thank u

Author: Rahul             
Posted Date: December 10, 2008     Points: 5   

Hi Raja,
Check out this link to play mp3 files in asp.net.

http://www.codeproject.com/aspnet/MP3PlayerControl.asp

Author: serendipITy             
Posted Date: August 19, 2011     Points: 20   

Hey there,

This might help

http://www.mioplanet.com/rsc/embed_mediaplayer.htm

Regards,
watevsss



Post Reply

You must Sign In To post reply
 
 
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery
JavaScript/VBScriptBiztalkWPFPatten/PracticesWCFOthers
www.DotNetSpark.comUnAnsweredAll

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend