How to add Html Audio element using c# code
<p>On an asp button's onClick event, I want to play a song on client. I have written the following code for doing so..</p>

<pre><code>protected void btn1_Click(object sender, EventArgs e)
{
    HtmlGenericControl myAudio = new HtmlGenericControl("audio");
    myAudio.Attributes.Add("autoplay", "true");
    myAudio.Attributes.Add("hidden", "true");
    myAudio.Attributes.Add("src", Server.MapPath("~/Songs/") + "1.wav");
    myDivTag.Controls.Add(myAudio);
}
</code></pre>

<p>The Html is as follows : </p>

<pre><code>&lt;div id="myDivTag" runat="server"&gt;&lt;/div&gt;
</code></pre>

<p>But even after the code is executed the <code>div</code> tag remains empty, And the song is not played. What am i doing wrong?</p>