Click here to Skip to main content
15,879,326 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have stored audio url path in database .I want how to retrieve the path & how display in .aspx file with play & download option.I am beginner to asp.net.Thanks in advance.
Posted
Comments
Nandakishore G N 22-Feb-13 2:03am    
what have you done till now? paste it..
chandan norway 22-Feb-13 2:04am    
<div id="div3" style="border:solid 1px black">

<asp:GridView ID="GridView7" runat="server" AutoGenerateColumns="False"
GridLines="None" DataSourceID="SqlDataSource8">
<columns>
<asp:TemplateField>
<itemtemplate>
<object type="application/x-shockwave-flash" data='<%# Eval("audiourl") %>' width="240" height="20" id="p1">
<param name="wmode" value="transparent" />
<param name="movie" value='<%# Eval("audiourl") %>' />
</object>


<asp:HyperLinkField DataNavigateUrlFields="slno" Text="Download" HeaderText="Download" />


<asp:SqlDataSource ID="SqlDataSource8" runat="server"
ConnectionString="<%$ ConnectionStrings:call2dbConnectionString %>"
SelectCommand="SELECT C2C_mediadetails.audiourl, C2C_mediadetails.slno FROM C2C_mediadetails INNER JOIN C2C_mediamaster ON C2C_mediadetails.slno = C2C_mediamaster.slno">
</div>

Here you go with the nice solution of same question:
live audio stream in asp.net[^]


--Amit
 
Share this answer
 
C#
protected void Page_Load(object sender, EventArgs e)
    {
        SqlConnection sqlconn = new SqlConnection("server=.\\sqlexpress;database=practice;integrated security=true");
        SqlCommand sqlcomm = new SqlCommand("select * from songs", sqlconn);
        sqlconn.Open();
        SqlDataReader dr = sqlcomm.ExecuteReader();
        GridView1.DataSource = dr;
        GridView1.DataBind();
        dr.Close();
        sqlconn.Close();
    }


ASP.NET
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
            CellPadding="4" ForeColor="#333333" GridLines="None">
            <RowStyle BackColor="#EFF3FB" />
        <Columns>
        <asp:BoundField HeaderText="ID" DataField="id" ReadOnly="true" />

        

        <asp:TemplateField HeaderText="Song">
        <ItemTemplate>
<object type="application/x-shockwave-flash" data='dewplayer-vol.swf?mp3=<%# Eval("songurl") %>'
                    width="240" height="20" id="dewplayer">
                    <param name="wmode" value="transparent" />
                    <param name="movie" value='dewplayer-vol.swf?mp3=<%# Eval("songurl") %>'/>
                </object>
            </ItemTemplate>
      
       
       
        
        
        </asp:TemplateField>
        
        </Columns>
            <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
            <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
            <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <EditRowStyle BackColor="#2461BF" />
            <AlternatingRowStyle BackColor="White" />
        </asp:GridView>
 
Share this answer
 
v2
Comments
Surendra0x2 22-Feb-13 2:16am    
You Can Download Dew Player check this site-
www.alsacreations.fr/dewplayer-en.html

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