Click here to Skip to main content
15,888,521 members
Please Sign up or sign in to vote.
3.00/5 (2 votes)
See more:
how to play .mp3 file by clicking the name of .mp3 file in gridview?

In gridview all the name of .mp3 songs are available. I want if i will click the name of .mp3 file that mp3 song should play.

Please give instruction? All the songs are available in database SQL. If i will click the name of the song it will retrieve that song from database and it should play that particular song.

here the design coding:

<asp:GridView ID="GridView1" runat="server" 
            onselectedindexchanged="GridView1_SelectedIndexChanged" BackColor="White" 
            BorderColor="#999999" BorderStyle="Solid" BorderWidth="1px" CellPadding="3" 
            ForeColor="Black" GridLines="Vertical">
        <FooterStyle BackColor="#CCCCCC" /><code></code>
    <Columns>
    <asp:TemplateField>
    <ItemTemplate>
    <asp:Button ID="btn"  ToolTip='<%Eval("id") %>' runat="server" Text="Play"/>
    
    </ItemTemplate>
    </asp:TemplateField>
    </Columns> 
        <PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" />
        <SelectedRowStyle BackColor="#000099" Font-Bold="True" ForeColor="White" />
        <HeaderStyle BackColor="Black" Font-Bold="True" ForeColor="White" />
        <AlternatingRowStyle BackColor="#CCCCCC" />
    </asp:GridView>
Posted
Updated 25-Jun-11 17:47pm
v2

 
Share this answer
 
This[^] could help you get started.
 
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