Last post Jan 13, 2016 06:27 PM by petey100
Jan 12, 2016 07:38 PM|petey100|LINK
I am having numerous problems with getting the html5 audio control to work in my ASP.NET page. I am using IE11 and finally got the control to work by converting my MP3 to an M4A format. That was a big hurdle in itself. My next thing is to have the music
I would even like to fire it off from a C# event as well but can't seem to get my hooks into the audio control. Anyone got this to work in Visual Studio 10 with IE11 and specifying content = "ie=edge". Seems to work fine browsing other sites than my own ASP.NET
Jan 13, 2016 06:29 AM|Fei Han - MSFT|LINK
You could try to use event.preventDefault() method to cancel the default action to prevent button from posting back.
Jan 13, 2016 06:27 PM|petey100|LINK
I threw in the towel on HTML5 audio control and IE11 with ASP.NET. Using (below) the following HTML and C# code I got it to work on an ASP.NET website and IE11. Funny thing with the audio control, it always works in Chrome. BTW, I found the right settings
to get the audio control to work in the Visual Studio debugger and I thought I was home free. The problem was it would not work or show at all after the code was actually deployed. Embed was definitely a slam dunk as far as working in IE but I need to piece
together the right setup (below) to do it. Hope this helps someone....
On my image click event I used this C# code:
Page.ClientScript.RegisterStartupScript(this.GetType(), "CallMyFunction", "PlaySong()", true);