Welcome to Dream.In.Code
Become an Expert!

Join 150,064 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,761 people online right now. Registration is fast and FREE... Join Now!




How to play mp3 from gridview

 
Reply to this topicStart new topic

How to play mp3 from gridview, I have a gridview with mp3s. It will allow the mp3 to be saved, but I

debinark
21 Feb, 2008 - 10:06 AM
Post #1

New D.I.C Head
*

Joined: 18 Feb, 2008
Posts: 1

I am using Visual Web Developer 2008 Express to build a site. It has a dropdownbox that populates the gridview. The gridview has the title, speaker, date, and a hyperlink that allows the user to download the file to play. I also want a column that says "Click to play" and plays the file. Must be able to play PC and Mac.
Thank you!!!!


CODE

<%@ Page Language="VB" MasterPageFile="~/MasterPage2.master" AutoEventWireup="false" CodeFile="Teletest.aspx.vb" Inherits="MembersPages_Teletest" title="Untitled Page" %>


<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" Runat="Server">
    <br />
    Choose the topic 
    <asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True"
        DataSourceID="ObjectDataSource1" DataTextField="CategoryType"
        DataValueField="CategoryType">
    </asp:DropDownList>
    <asp:ObjectDataSource ID="ObjectDataSource1" runat="server"
        InsertMethod="Insert" OldValuesParameterFormatString="original_{0}"
        SelectMethod="GetData" TypeName="DataSet1TableAdapters.CategoriesTableAdapter">
        <InsertParameters>
            <asp:Parameter Name="CategoryType" Type="String" />
        </InsertParameters>
    </asp:ObjectDataSource>
    <br /><br />

    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"
        BackColor="White" BorderColor="#999999" BorderStyle="Solid" BorderWidth="1px"
        CellPadding="3" DataSourceID="ObjectDataSource3" ForeColor="Black"
        GridLines="Vertical">
        <FooterStyle BackColor="#CCCCCC" />
        <Columns>
            <asp:BoundField DataField="title" HeaderText="Teleconference Title"
                SortExpression="title" />
            <asp:BoundField DataField="artist" HeaderText="Speaker"
                SortExpression="artist" />
            <asp:BoundField DataField="date" DataFormatString="{0:MM/dd/yyyy}"
                HeaderText="Date" SortExpression="date" />
            <asp:HyperLinkField DataNavigateUrlFields="url" Text="Save" />
        </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>
    <asp:ObjectDataSource ID="ObjectDataSource3" runat="server"
        OldValuesParameterFormatString="original_{0}"
        SelectMethod="GetDataByCategoryType"
        TypeName="DataSet1TableAdapters.TeleconferencesTableAdapter">
        <SelectParameters>
            <asp:ControlParameter ControlID="DropDownList1" Name="CategoryType"
                PropertyName="SelectedValue" Type="String" />
        </SelectParameters>
    </asp:ObjectDataSource>


    </asp:Content>

User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 1/8/09 10:41PM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month