Media player in gridview

Joined
May 4, 2010
Messages
1
Reaction score
0
Hello,
first i want to say that i'm a beginner in asp.net and c# so it's not easy for me to understand lots and lots of code. So, for my website i'm making a gridview with some data. One of those fields contains a filename. I want to be able to take the value of that field and use it to create a media player in the same row (after every row a mediaplayer playing a different file). I can create a media player with a certain url but here you have to use a variable or something. I have tried some things but with my small knowledge of asp.net i wasn't able to make it work.

Here is what I got already:
<asp:GridView ID="GridView1" runat="server" BorderStyle="None" AutoGenerateColumns="False"
DataSourceID="SqlDataSource1" AllowPaging="True" CellPadding="1"
DataKeyNames="Bestand">
<Columns>
<asp:BoundField DataField="Artiest" HeaderText="Artiest"
SortExpression="Artiest" />
<asp:BoundField DataField="Lied" HeaderText="Lied" SortExpression="Lied" />
<asp:BoundField DataField="Album" HeaderText="Album" SortExpression="Album" />
<asp:BoundField DataField="Genre" HeaderText="Genre" SortExpression="Genre" />
<asp:BoundField DataField="Gebruikersnaam" HeaderText="Gebruikersnaam"
SortExpression="Gebruikersnaam" />
<asp:BoundField DataField="Bestand" HeaderText="Bestand"
SortExpression="Bestand" ReadOnly="True" />
<asp:TemplateField HeaderText="Beluister"><ItemTemplate>Mediaplayer here (can't submit links on this forum yet) </ItemTemplate></asp:TemplateField>
<%--<asp:CommandField ShowDeleteButton="True" />--%>
<asp:TemplateField><ItemTemplate>
<asp:LinkButton ID="LinkButton1" Runat="server" OnClientClick="return confirm('Are you sure you want to delete this record?');"
CommandName="Delete">Verwijder</asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField><ItemTemplate><button type="button" onclick="Verplaats">Keur Goed</button> </ItemTemplate></asp:TemplateField>

</Columns>
</asp:GridView>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

Forum statistics

Threads
473,768
Messages
2,569,575
Members
45,054
Latest member
LucyCarper

Latest Threads

Top