hou to play .wav audio file in asp.net application

hou to play .wav audio file in asp.net application
polythoughtAsked:
Who is Participating?
 
Elvio Lujan.Net Senior DeveloperCommented:
you can make a link with the url where is the wav files

<a href='....file.wav'>play</a>
0
 
YZlatCommented:
or

Public Declare Function playa Lib "winmm.dll" Alias "sndPlaySoundA" (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long

Public Sub PlayWav(sFile As String)
    If Dir(sFile$) <> "" Then Call playa(sFile, SND_FLAG)
End Sub

PlayWav("c:\myfile.wav")

0
Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

 
ThargolCommented:
Use an object-tag to embed windows-media player in your html-page and point it to the url of the wav-file.

See the this link for an example:http://www.mioplanet.com/rsc/embed_mediaplayer.htm
0
 
ThargolCommented:
Hi TheLeaderone,

The comments from YZlat or not a solution the problem.
My solution and the one from lem2802 would work.

Regards,
Richard
0
 
YZlatCommented:
Thargol, could you do me a favor and explain what is wrong with my solution
0
 
ThargolCommented:
Hi, yZlat

Your solution is for vb.net, so a client application. The question was for asp.net, so a server based web application.

Btw in vb.net 8 (Framework 2.0) you can play audio in vb with the following line:

my.Computer.Audio.Play(filename)

But again this is not a way to play audio in a website.

Regards,
Richard


0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.